Created
November 19, 2019 13:46
-
-
Save sneak/03e67f373bd312b390b6ae8a8291a76a to your computer and use it in GitHub Desktop.
/etc/service/syncthing/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ ! -d /secure/sneak/sync/Sync ]]; then | |
echo "sync dir not mounted, exiting" > /dev/stderr | |
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$(hostname) cannot access sync dir \"}" https://hooks.slack.com/services/lolno & | |
sleep 600 | |
exit 1 | |
fi | |
echo 204800 > /proc/sys/fs/inotify/max_user_watches | |
export STNODEFAULTFOLDER=1 | |
export STNOUPGRADE=1 | |
export HOME=/secure/sneak/sync | |
exec chpst -u syncthing:syncthing syncthing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment