Hi there!
I know that this thread is really old but I have a question about my startup script.
My script is something like this:
Code: Select all
#!/bin/sh
### BEGIN INIT INFO
# Provides: vlcd
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Should-Start: $network
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: VLC daemon
# Description: VLC daemon with HTTP interface.
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON_BIN=/usr/bin/vlc-wrapper
NAME=vlcd
DESC="VLC daemon"
PIDFILE=/tmp/vlcd.pid
[ -x "$DAEMON_BIN" ] || exit 0
DAEMON_OPTS="--ttl 10 --vlm-conf /vlc/zdf-dlf.vlm"
USER="user"
. /lib/lsb/init-functions
case "$1" in
start)
export DISPLAY=:0.0
log_daemon_msg "Starting $DESC" "$NAME"
start-stop-daemon --start --background --oknodo --quiet --chuid "$USER" --make-pidfile --pidfile "$PIDFILE" --exec "$DAEMON_BIN" -- $DAEMON_OPTS > /dev/null 2>&1
log_end_msg "$?"
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --oknodo --quiet --pidfile "$PIDFILE"
log_end_msg "$?"
;;
restart)
$0 stop
sleep 8
$0 start
;;
status)
status_of_proc "$DAEMON_BIN" "$NAME" -p "$PIDFILE"
exit $?
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0
This script works fine if I am already logged in. As the user I want run with or with user root.
I also made a symbol link in /etc/rc2.d to the init.d script.
My problem is, that everytime the server starts the script runs and the vlc-wrapper would be started. But the stream doesn't work. If I stop the deamon manually and start it on the commandline again, everything is working fine.
Have anyone an idea where my problem is located?
Kind regards,
Thomas