Merge branch 'main' of dev.hostsharing.net:hostsharing/hs.scripts

This commit is contained in:
Milan 2024-10-23 15:21:58 +02:00
commit fc352f2ff3
4 changed files with 49 additions and 2 deletions

View File

@ -2,4 +2,7 @@ pac=xyz00
user=
db=${pac}_${user}
dbuser=$db
dump=$HOME/var/db/nextcloud.dump
dump=$HOME/var/db/nextcloud.dump
# optional version control, if default or configured one is too old
# do not comment this
php=php

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