### BEGIN INIT INFO
-# Provides: rs-serve
+# Provides: krsd
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Using the lsb functions to perform the operations.
. /lib/lsb/init-functions
# Process name ( For display )
-NAME=rs-serve
+NAME=krsd
# Daemon name, where is the actual executable
-DAEMON=/usr/bin/rs-serve
+DAEMON=/usr/bin/krsd
# pid file for the daemon
-PIDFILE=/var/run/rs-serve.pid
+PIDFILE=/var/run/krsd.pid
# If the daemon is not there, then exit.
test -x $DAEMON || exit 5
+. /etc/default/krsd
+
case $1 in
start)
# Checked the PID file exists and check the actual status of process
log_daemon_msg "Starting the process" "$NAME"
# Start the daemon with the help of start-stop-daemon
# Log the message appropriately
- if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON ; then
+ if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $OPTIONS ; then
log_end_msg 0
else
log_end_msg 1