I've built an ugly init script to start & stop my Vlc server. It needs some improvement (especially at the 'killall' part) but does the trick for me at the moment. Here it is:
Code: Select all
#!/bin/sh
# Start/stop VLC Daemon.
# Quick'n'dirty way by Louwrens @ 19-01-2005
PROGRAM="/usr/bin/vlc"
OPTIONS=" --youroptions"
test -f $PROGRAM || exit 0
case "$1" in
start) echo -n "Starting VLC"
$PROGRAM $OPTIONS
echo "."
;;
stop) echo -n "Stopping VLC"
killall $PROGRAM
echo "."
;;
restart) echo -n "Restarting VLC"
killall $PROGRAM
$PROGRAM $OPTIONS
echo "."
;;
*) echo "Usage: /etc/init.d/vlc start|stop|restart"
exit 1
;;
esac
exit 0