mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-19 19:45:12 +00:00
Add example for runit service
This commit is contained in:
parent
9a549a853b
commit
a9544ca890
1
etc/README.md
Normal file
1
etc/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
This directory contains contributed setup examples.
|
15
etc/linux-runit/README.md
Normal file
15
etc/linux-runit/README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
This directory contains a configuration for running syncthing under the
|
||||||
|
"runit" service manager on Linux. It probably works perfectly fine on
|
||||||
|
other platforms also using runit.
|
||||||
|
|
||||||
|
1. Install runit.
|
||||||
|
|
||||||
|
2. Edit the `run` file to set the username to run as, the user's home
|
||||||
|
directory and the place where the syncthing binary lives. It is
|
||||||
|
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`.
|
||||||
|
|
||||||
|
Log output is sent to syslogd.
|
||||||
|
|
8
etc/linux-runit/run
Normal file
8
etc/linux-runit/run
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export USERNAME=jb
|
||||||
|
export HOME="/home/$USERNAME"
|
||||||
|
export SYNCTHING="$HOME/bin/syncthing"
|
||||||
|
|
||||||
|
setuidgid "$USERNAME" "$SYNCTHING" -logflags 0 2>&1 | logger -t syncthing
|
||||||
|
|
Loading…
Reference in New Issue
Block a user