Fix syncthing process reparenting with runit
When you: `sudo sv down /etc/service/syncthing/` the `TERM` signal isn't propogated or trapped, so syncthing is orphaned and adopted by init (PID 1). - Changed call to `chpst` to `exec` - Moved logging to `log/run` per `runsv` standard
This commit is contained in:
@@ -4,5 +4,6 @@ export USERNAME=jb
|
||||
export HOME="/home/$USERNAME"
|
||||
export SYNCTHING="$HOME/bin/syncthing"
|
||||
|
||||
chpst -u "$USERNAME" "$SYNCTHING" -logflags 0 2>&1 | logger -t syncthing
|
||||
exec 2>&1
|
||||
exec chpst -u "$USERNAME" "$SYNCTHING" -logflags 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user