It is not very hard to write a startupscript,
copy or softlink to /etc/init.d/
change the SLIMPATH and SLIMUSER
then issue a chkconfig command to add the /etc/rc.d
softlinks


#chkconfig --add slimserver

% cat /etc/init.d/slimserver
#! /bin/sh
#
# startupscript hack for slimserver
# mortenb april 2007
#
### BEGIN INIT INFO
# Provides: slimserver
# Required-Start:  $network $portmap
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description:  Slimserver is a music streamer serving the squeezebox
### END INIT INFO

SLIMPATH=/dist/SlimServer/squeezecenter-7.0-17793
SLIMBIN=slimserver.pl
SLIMUSER=mortenb
OPTIONS="--daemon"
test -x $SLIMPATH/$SLIMBIN || exit 5

. /etc/rc.status

rc_reset



case "$1" in
start)
echo -n "Starting $SLIMBIN "
/bin/su -l $SLIMUSER -c "$SLIMPATH/$SLIMBIN $OPTIONS";
rc_status -v
;;
stop)
echo -n "Terminating $SLIMBIN "
killall -TERM $SLIMBIN
rc_status -v
;;
restart)
stop;
start;
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
rc_exit


-- 
mortenb
------------------------------------------------------------------------
mortenb's Profile: http://forums.slimdevices.com/member.php?userid=10837
View this thread: http://forums.slimdevices.com/showthread.php?t=39307

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix

Reply via email to