Merge pull request #1438 from moshen/runit-reparenting

Fix syncthing process reparenting with runit
This commit is contained in:
Jakob Borg 2015-03-10 08:21:41 +01:00
commit 7b22e09805
3 changed files with 8 additions and 2 deletions

View File

@ -9,7 +9,8 @@ other platforms also using runit.
recommended to place it in a directory writeable by the running user
so that automatic upgrades work.
3. Copy the edited `run` file to `/etc/service/syncthing/run`.
3. Copy this directory (containing the edited `run` file and `log` folder) to
`/etc/service/syncthing`.
Log output is sent to syslogd.

4
etc/linux-runit/log/run Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
exec logger -t syncthing

View File

@ -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