blob: ce34a6e31350c63992ea8779067c39eae450c473 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/sbin/openrc-run
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
: ${command_user:="syncthing:syncthing"}
SYNCTHING_HOMEDIR=${SYNCTHING_HOMEDIR:-/var/lib/syncthing/.config/syncthing}
SYNCTHING_LOGFILE=${SYNCTHING_LOGFILE:-/var/log/syncthing/syncthing.log}
SYNCTHING_GUI_ADDRESS=${SYNCTHING_GUI_ADDRESS:-http://127.0.0.1:8384}
description="Open Source Continuous File Synchronization"
command="/usr/bin/syncthing"
supervisor=supervise-daemon
command_args="serve --no-browser --no-restart \
--home=${SYNCTHING_HOMEDIR} \
--log-file=\"${SYNCTHING_LOGFILE}\"
--no-log-format-level-string --log-format-level-syslog \
--gui-address=${SYNCTHING_GUI_ADDRESS} \
${SYNCTHING_OPTS}"
depend() {
need localmount
after net
}
start_pre() {
checkpath -q -d -o "${command_user}" "${SYNCTHING_HOMEDIR}"
checkpath -q -f -o "${command_user}" "${SYNCTHING_LOGFILE}"
}
|