diff --git a/rollback/nextcloud/config.env b/rollback/nextcloud/config.env index fa9bcaf..343f302 100644 --- a/rollback/nextcloud/config.env +++ b/rollback/nextcloud/config.env @@ -2,4 +2,7 @@ pac=xyz00 user= db=${pac}_${user} dbuser=$db -dump=$HOME/var/db/nextcloud.dump \ No newline at end of file +dump=$HOME/var/db/nextcloud.dump +# optional version control, if default or configured one is too old +# do not comment this +php=php \ No newline at end of file diff --git a/updates/nextcloud.sh b/updates/nextcloud.sh index 2e93ea8..87272f5 100644 --- a/updates/nextcloud.sh +++ b/updates/nextcloud.sh @@ -4,7 +4,7 @@ set -e # +x does not apply # use correct order – eg: sudo -u www-data php=php8.2 ... if [ -z ${php} ]; then - php="php8.1" + php="php8.2" fi [ -f cron.log ] && rm -v cron.log && echo "logfiles should not be here and upset the updater. consider the data directory." diff --git a/updates/sliding-sync.sh b/updates/sliding-sync.sh new file mode 100644 index 0000000..5959282 --- /dev/null +++ b/updates/sliding-sync.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e +export XDG_RUNTIME_DIR=/run/user/$UID + +release=`curl -L https://api.github.com/repos/matrix-org/sliding-sync/releases/latest -s | jq -r '.tag_name'` + +echo ">>> stopping to avoid binary being busy" +echo +systemctl stop --user syncv3 + +wget --show-progress -q -O $HOME/bin/syncv3 https://github.com/matrix-org/sliding-sync/releases/download/$release/syncv3_linux_amd64 + +echo +echo ">>> starting...." +systemctl start --user syncv3 +sleep 2 +systemctl status --user syncv3 \ No newline at end of file diff --git a/updates/synapse.sh b/updates/synapse.sh new file mode 100644 index 0000000..3a0e4ee --- /dev/null +++ b/updates/synapse.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -e +export XDG_RUNTIME_DIR=/run/user/$UID + +activate="$HOME/synapse/env/bin/activate" +domain=`ls $HOME/doms/` + +if [ ! -f $activate ]; +then + echo ">>> FATAL: Synapse env not detected. Stopping. Please adjust the script." + exit 1 +fi + +source $activate + +pip install --upgrade 'matrix-synapse[postgres]' pip + +systemctl --user restart synapse + +sleep 2 +echo +echo ">>> Synapse has been restarted and" +echo ">>> is now reporting this version:" +curl -s "https://$domain/_synapse/admin/v1/server_version"|jq +echo + +systemctl --user status synapse \ No newline at end of file