diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-03-07 10:55:31 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-03-07 10:55:31 +0000 |
commit | ad6eacc565efb2da52fa9345883ce182a51d0c96 (patch) | |
tree | c410d4aa8db0ccd176d75b473f0b198175ddd801 /testing/vlc/vlc.initd | |
parent | f408a132c937acaa0080e9f0ebbb2c85e596e109 (diff) | |
download | aports-ad6eacc565efb2da52fa9345883ce182a51d0c96.tar.bz2 aports-ad6eacc565efb2da52fa9345883ce182a51d0c96.tar.xz |
testing/vlc: fix init.d script for vlc-daemon
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 $? } - |