diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-03-07 12:06:21 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-03-07 12:06:21 +0000 |
commit | 2ec1f059e1be9fdc9828418da494c3edf8c7f604 (patch) | |
tree | f2fce2950e25a39b6ac6df25f0956e3decb01f89 /main/vlc/vlc.initd | |
parent | ad6eacc565efb2da52fa9345883ce182a51d0c96 (diff) | |
download | aports-2ec1f059e1be9fdc9828418da494c3edf8c7f604.tar.bz2 aports-2ec1f059e1be9fdc9828418da494c3edf8c7f604.tar.xz |
main/vlc: upgrade to 2.0.0 (from testing)
Diffstat (limited to 'main/vlc/vlc.initd')
-rwxr-xr-x | main/vlc/vlc.initd | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/main/vlc/vlc.initd b/main/vlc/vlc.initd index 11567dcd86..8fe3b48660 100755 --- a/main/vlc/vlc.initd +++ b/main/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 $? } - |