From 319e05a3c262af9f82f33fdaa9dd3d1fbebd26e3 Mon Sep 17 00:00:00 2001 From: Milan Ihl Date: Thu, 23 May 2024 14:33:15 +0200 Subject: [PATCH] add updates/sliding-sync.sh --- updates/sliding-sync.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 updates/sliding-sync.sh 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