Initial commit (I feel unsafe)
This commit is contained in:
18
syncthing_server-setup
Normal file
18
syncthing_server-setup
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user