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 | |
parent | f408a132c937acaa0080e9f0ebbb2c85e596e109 (diff) | |
download | aports-ad6eacc565efb2da52fa9345883ce182a51d0c96.tar.bz2 aports-ad6eacc565efb2da52fa9345883ce182a51d0c96.tar.xz |
testing/vlc: fix init.d script for vlc-daemon
-rw-r--r-- | testing/vlc/APKBUILD | 2 | ||||
-rw-r--r-- | testing/vlc/vlc.confd | 10 | ||||
-rwxr-xr-x | testing/vlc/vlc.initd | 24 |
3 files changed, 25 insertions, 11 deletions
diff --git a/testing/vlc/APKBUILD b/testing/vlc/APKBUILD index b9e9dc8771..578b085dda 100644 --- a/testing/vlc/APKBUILD +++ b/testing/vlc/APKBUILD @@ -3,7 +3,7 @@ pkgname=vlc pkgver=2.0.0 _pkgver=${pkgver/_/-} -pkgrel=1 +pkgrel=2 pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player" pkgusers="vlc" pkggroups="vlc" diff --git a/testing/vlc/vlc.confd b/testing/vlc/vlc.confd index c42344b606..9a58842bd6 100644 --- a/testing/vlc/vlc.confd +++ b/testing/vlc/vlc.confd @@ -1,11 +1,15 @@ # Sample vlc params suitable for running as a daemon -## --daemon detach from prompt ## --file-logging enable file logging ## --logfile logfile name/path ## -vvv verbose logging ## -I dummy disable X11 interface ## --sout PARAMS encoding parameters -## Do NOT quote 'PARAMS' otherwise shell expansions will broke vlc -VLC_OPTS="-vvv -I dummy alsa://hw:0,0 --daemon --file-logging --logfile /var/log/vlc/vlc.log --sout #transcode{acodec=mp3,ab=48,channels=1,samplerate=22050}:std{access=http,mux=ogg,dst=:8080}" + +## Do NOT quote 'PARAMS' otherwise shell expansions will broke vlc +## +## The --daemon option will automatically be added so no need to add it +## here. + +VLC_OPTS="--quiet -I dummy alsa://hw:0,0 --file-logging --logfile /var/log/vlc/vlc.log --sout #transcode{acodec=mp3,ab=48,channels=1,samplerate=22050}:std{access=http,mux=ogg,dst=:8080}" 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 $? } - |