add updates/sliding-sync.sh

This commit is contained in:
Milan Ihl 2024-05-23 14:33:15 +02:00
parent 07b6e24576
commit 319e05a3c2

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