Compare commits

...

4 Commits

Author SHA1 Message Date
791bea4d12 updates/nextcloud.sh: bump php version 2024-07-18 16:38:49 +02:00
319e05a3c2 add updates/sliding-sync.sh 2024-05-23 14:33:15 +02:00
07b6e24576 reliability adjustments for updates/synapse.sh 2024-05-15 13:21:46 +02:00
bdcc677d10 add synapse update script (without worker support)
even tho it's not complicated and there are multiple correct ways, i think it's better if we have one common update strategy to avoid conflicts or other errors in the future. this shall be expanded for worker support in the future.
2024-05-15 12:04:42 +02:00
3 changed files with 45 additions and 1 deletions

View File

@ -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."

17
updates/sliding-sync.sh Normal file
View File

@ -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

27
updates/synapse.sh Normal file
View File

@ -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