4
# Provides: turku-agent-rsyncd
5
# Required-Start: $remote_fs $syslog
6
# Required-Stop: $remote_fs $syslog
8
# Default-Start: 2 3 4 5
10
# Short-Description: turku rsync daemon
11
# Description: turku rsync daemon
16
PID_FILE=/var/run/turku-agent-rsyncd.pid
18
. /lib/lsb/init-functions
20
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
24
log_daemon_msg "Starting turku rsync daemon" "turku-agent-rsyncd"
25
start-stop-daemon --start --quiet --background --make-pidfile \
26
--pidfile $PID_FILE --exec /usr/bin/env -- turku-agent-rsyncd-wrapper
30
log_daemon_msg "Stopping turku rsync daemon" "turku-agent-rsyncd"
31
start-stop-daemon --stop --quiet --oknodo --pidfile $PID_FILE --retry 5
37
log_daemon_msg "Reloading turku rsync daemon" "turku-agent-rsyncd"
47
status_of_proc -p $PID_FILE rsync turku-agent-rsyncd
48
exit $? # notreached due to set -e
51
echo "Usage: /etc/init.d/turku-agent-rsyncd {start|stop|reload|force-reload|restart|status}"