#!/bin/bash # Syncthing starts running and installs user service upon installation (in instance-setup) echo -e "\n[+] setting up syncthing\n-------\n" # shellcheck source=syncthing_server-env . "${HOME}/${USER}-env" echo -e "[+] restoring config from backup..." syncthing cli operations shutdown rm -rf "${CONFIG_PATH}"/*.db # regenerate db to avoid data loss/errors rclone copy "${BUCKET_PATH}" "${CONFIG_PATH}" -v echo "[+] restarting..." systemctl --user restart syncthing.service