mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-28 04:42:14 +01:00
33 lines
538 B
Plaintext
33 lines
538 B
Plaintext
#!/sbin/runscript
|
|
|
|
NAME=lsyncd
|
|
DAEMON=/usr/bin/$NAME
|
|
PIDFILE=/var/run/$NAME.pid
|
|
USER=root
|
|
GROUP=root
|
|
CONF=/etc/lsyncd/lsyncd.lua
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|
|
start() {
|
|
touch "$PIDFILE"
|
|
chown $USER:$GROUP "$PIDFILE"
|
|
ebegin "Starting $NAME"
|
|
start-stop-daemon --start --quiet \
|
|
--pidfile "$PIDFILE" \
|
|
--user "$USER" --group "$GROUP" \
|
|
--chdir /etc/lsyncd \
|
|
--exec "$DAEMON" -- \
|
|
"$CONF" -pidfile "$PIDFILE"
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping $NAME"
|
|
start-stop-daemon --stop --quiet \
|
|
--pidfile "$PIDFILE"
|
|
eend $?
|
|
}
|