diff options
Diffstat (limited to 'testing/vlc/vlc.initd')
-rwxr-xr-x | testing/vlc/vlc.initd | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/testing/vlc/vlc.initd b/testing/vlc/vlc.initd index 11567dcd86..8fe3b48660 100755 --- a/testing/vlc/vlc.initd +++ b/testing/vlc/vlc.initd @@ -1,22 +1,32 @@ #!/sbin/runscript +description="VideoLAN daemon" +pidfile="/var/run/vlc/${RC_SVCNAME}.pid" +command="/usr/bin/vlc" + depend() { need net + after firewall +} + +start_pre() { + checkpath --directory --owner vlc:vlc --mode 775 ${pidfile%/*} } start() { - ebegin "Starting VLC" + ebegin "Starting ${RC_SVCNAME}" start-stop-daemon --start \ --user vlc \ - --exec /usr/bin/vlc -- ${VLC_OPTS} + --pidfile ${pidfile} \ + --exec ${command} \ + -- \ + --daemon --pidfile ${pidfile} ${VLC_OPTS} eend $? } -stop () { - ebegin "Stopping VLC" +stop() { + ebegin "Stopping ${RC_SVCNAME}" start-stop-daemon --stop \ - --signal KILL \ - --exec /usr/bin/vlc + --pidfile ${pidfile} eend $? } - |