Skip to content

Instantly share code, notes, and snippets.

@sneak
Created October 5, 2019 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sneak/046716b5ba796e37d0d13c15da387d47 to your computer and use it in GitHub Desktop.
Save sneak/046716b5ba796e37d0d13c15da387d47 to your computer and use it in GitHub Desktop.
syncthing runscript
#!/bin/bash
export STNODEFAULTFOLDER=1
export STNOUPGRADE=1
export HOME=/secure/sneak/sync
if [[ ! -d "$HOME" ]]; then
echo "sync dir not mounted, exiting" > /dev/stderr
sleep 10
exit 1
fi
exec chpst -u syncthing:syncthing syncthing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment