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 03, 2007Aspirant
Hi Joh-Dah,
Created my custom script, it works.
Thank you. For the info of other Infrant users, hereby the scriptcontent:
nas01:~# ls -l /etc/rc3.d/
total 0
lrwxrwxrwx 1 root root 15 dec 1 23:18 S100kissd -> ../init.d/kissd
lrwxrwxrwx 1 root root 13 nov 26 15:25 S99rc3 -> ../init.d/rc3
nas01:~#
nas01:~# ls -l /etc/init.d/kissd
-rwxr-xr-x 1 root root 975 dec 3 10:58 /etc/init.d/kissd
nas01:~#
nas01:~# cat /etc/init.d/kissd
#! /bin/sh
#
# This file is created by Peter, the owner of this NAS.
#
# It starts the streaming daemon Kissd, which is used by Mediaplayers of Vendor KISS.
#
# Created 01 december 2007.
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
DAEMON=/usr/local/bin/kissd
CONFIG=/usr/local/etc/kissd.conf
PIDFILE=/var/run/kissd.pid
# Arguments to kissd
#
ARGS="-c $CONFIG -d"
test -x $DAEMON || exit 0
test -f $CONFIG || exit 0
case "$1" in
start)
echo -n "Starting Streaming Media Server: kissd"
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $ARGS
echo "."
;;
stop)
echo -n "Stopping Streaming Media Server: kissd"
start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
echo "."
;;
reload)
echo "Not implemented."
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
*)
echo "Usage: /etc/init.d/kissd {start|stop|restart|force-reload|reload}"
exit 1
;;
esac
exit 0
nas01:~#
Created my custom script, it works.
Thank you. For the info of other Infrant users, hereby the scriptcontent:
nas01:~# ls -l /etc/rc3.d/
total 0
lrwxrwxrwx 1 root root 15 dec 1 23:18 S100kissd -> ../init.d/kissd
lrwxrwxrwx 1 root root 13 nov 26 15:25 S99rc3 -> ../init.d/rc3
nas01:~#
nas01:~# ls -l /etc/init.d/kissd
-rwxr-xr-x 1 root root 975 dec 3 10:58 /etc/init.d/kissd
nas01:~#
nas01:~# cat /etc/init.d/kissd
#! /bin/sh
#
# This file is created by Peter, the owner of this NAS.
#
# It starts the streaming daemon Kissd, which is used by Mediaplayers of Vendor KISS.
#
# Created 01 december 2007.
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
DAEMON=/usr/local/bin/kissd
CONFIG=/usr/local/etc/kissd.conf
PIDFILE=/var/run/kissd.pid
# Arguments to kissd
#
ARGS="-c $CONFIG -d"
test -x $DAEMON || exit 0
test -f $CONFIG || exit 0
case "$1" in
start)
echo -n "Starting Streaming Media Server: kissd"
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $ARGS
echo "."
;;
stop)
echo -n "Stopping Streaming Media Server: kissd"
start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
echo "."
;;
reload)
echo "Not implemented."
;;
force-reload|restart)
sh $0 stop
sh $0 start
;;
*)
echo "Usage: /etc/init.d/kissd {start|stop|restart|force-reload|reload}"
exit 1
;;
esac
exit 0
nas01:~#
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!