NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Plukkie
Nov 28, 2007Aspirant
How to startup custom services at boottime automatically
Hi, I just installed my first piece of code on the NV+, a streaming daemon "kissd". I wonder how I can get this service startup automatic at bootime on the Infrant? I discovered there's only one...
Plukkie
Dec 06, 2007Aspirant
Hi Joh-Dah,
I upgraded my streaming daemon to a new version, modified the startscript as necessary, but auto startup at boottime does nog work.
When the machine finished booting and I start the script manually, it works. Stopping and restarting also works??
Do you know what can be wrong here?
Below the info:
=================================================
nas01:/# ls -l /etc/init.d/kissdx
-rwxr-xr-x 1 root root 1278 dec 6 18:18 /etc/init.d/kissdx
nas01:/#
nas01:/# ls -l /etc/rc3.d/
total 0
lrwxrwxrwx 1 root root 16 dec 6 18:15 S100kissdx -> ../init.d/kissdx
lrwxrwxrwx 1 root root 13 nov 26 15:25 S99rc3 -> ../init.d/rc3
nas01:/#
nas01:/# ls -l /usr/local/bin/kissdx
-rwxr-xr-x 1 root root 387881 dec 5 16:57 /usr/local/bin/kissdx
nas01:/#
nas01:/# ls -l /usr/local/etc/kissdx.conf
-rw-r--r-- 1 root 50 6686 dec 6 10:51 /usr/local/etc/kissdx.conf
nas01:/#
nas01:/# cat /etc/init.d/kissdx
#! /bin/sh
#
# This file is created by Peter, the owner of this NAS.
#
# It starts the streaming daemon Kissdx, which is used by Mediaplayers of Vendor KISS.
#
# Created 06 december 2007.
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
DAEMON=/usr/local/bin/kissdx
CONFIG=/usr/local/etc/kissdx.conf
# Arguments to kissdx
#
STARTARGS="-c $CONFIG -d"
STOPARGS="-s FORCESTOP"
GRACESTOP="-s STOP"
RELOAD="-s RELOAD_CONFIG"
test -x $DAEMON || exit 0
test -f $CONFIG || exit 0
case "$1" in
start)
echo -n "Starting Streaming Media Server: kissdx"
start-stop-daemon --start --quiet --exec $DAEMON -- $STARTARGS
echo "."
;;
stop)
echo -n "Stopping Streaming Media Server: kissdx"
start-stop-daemon --stop --quiet --exec $DAEMON -- $STOPARGS
echo "."
;;
gracestop)
echo -n "Stopping Streaming Media Server Gracefully: kissdx"
start-stop-daemon --stop --quiet --exec $DAEMON -- $GRACESTOP
echo "."
;;
reload)
echo -n "Reloading Configfile: kissdx"
start-stop-daemon --start --quiet --exec $DAEMON -- $RELOAD
echo "."
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
*)
echo "Usage: /etc/init.d/kissdx {start|stop|gracestop|restart|force-reload|reload}"
exit 1
;;
esac
exit 0
nas01:/#
================================================
thank you in advance.
I upgraded my streaming daemon to a new version, modified the startscript as necessary, but auto startup at boottime does nog work.
When the machine finished booting and I start the script manually, it works. Stopping and restarting also works??
Do you know what can be wrong here?
Below the info:
=================================================
nas01:/# ls -l /etc/init.d/kissdx
-rwxr-xr-x 1 root root 1278 dec 6 18:18 /etc/init.d/kissdx
nas01:/#
nas01:/# ls -l /etc/rc3.d/
total 0
lrwxrwxrwx 1 root root 16 dec 6 18:15 S100kissdx -> ../init.d/kissdx
lrwxrwxrwx 1 root root 13 nov 26 15:25 S99rc3 -> ../init.d/rc3
nas01:/#
nas01:/# ls -l /usr/local/bin/kissdx
-rwxr-xr-x 1 root root 387881 dec 5 16:57 /usr/local/bin/kissdx
nas01:/#
nas01:/# ls -l /usr/local/etc/kissdx.conf
-rw-r--r-- 1 root 50 6686 dec 6 10:51 /usr/local/etc/kissdx.conf
nas01:/#
nas01:/# cat /etc/init.d/kissdx
#! /bin/sh
#
# This file is created by Peter, the owner of this NAS.
#
# It starts the streaming daemon Kissdx, which is used by Mediaplayers of Vendor KISS.
#
# Created 06 december 2007.
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
DAEMON=/usr/local/bin/kissdx
CONFIG=/usr/local/etc/kissdx.conf
# Arguments to kissdx
#
STARTARGS="-c $CONFIG -d"
STOPARGS="-s FORCESTOP"
GRACESTOP="-s STOP"
RELOAD="-s RELOAD_CONFIG"
test -x $DAEMON || exit 0
test -f $CONFIG || exit 0
case "$1" in
start)
echo -n "Starting Streaming Media Server: kissdx"
start-stop-daemon --start --quiet --exec $DAEMON -- $STARTARGS
echo "."
;;
stop)
echo -n "Stopping Streaming Media Server: kissdx"
start-stop-daemon --stop --quiet --exec $DAEMON -- $STOPARGS
echo "."
;;
gracestop)
echo -n "Stopping Streaming Media Server Gracefully: kissdx"
start-stop-daemon --stop --quiet --exec $DAEMON -- $GRACESTOP
echo "."
;;
reload)
echo -n "Reloading Configfile: kissdx"
start-stop-daemon --start --quiet --exec $DAEMON -- $RELOAD
echo "."
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
*)
echo "Usage: /etc/init.d/kissdx {start|stop|gracestop|restart|force-reload|reload}"
exit 1
;;
esac
exit 0
nas01:/#
================================================
thank you in advance.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!