summaryrefslogtreecommitdiff
path: root/system/vlc/vlc.initd
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-04-05 18:33:58 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-04-05 18:33:58 -0500
commit0e821fea155ad2d3419090b61a6c072db9d5d882 (patch)
tree09ac7b1aa58f6b17ce4dedf57d988ae6f786c6e5 /system/vlc/vlc.initd
parent47090a16fe7a91ce7f73784341726bdca75bd4aa (diff)
downloadpackages-0e821fea155ad2d3419090b61a6c072db9d5d882.tar.gz
packages-0e821fea155ad2d3419090b61a6c072db9d5d882.tar.bz2
packages-0e821fea155ad2d3419090b61a6c072db9d5d882.tar.xz
packages-0e821fea155ad2d3419090b61a6c072db9d5d882.zip
system/vlc: new package
Alpine will never merge Pulse support in, so why bother
Diffstat (limited to 'system/vlc/vlc.initd')
-rwxr-xr-xsystem/vlc/vlc.initd32
1 files changed, 32 insertions, 0 deletions
diff --git a/system/vlc/vlc.initd b/system/vlc/vlc.initd
new file mode 100755
index 000000000..541a07180
--- /dev/null
+++ b/system/vlc/vlc.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+
+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 ${RC_SVCNAME}"
+ start-stop-daemon --start \
+ --user vlc \
+ --pidfile ${pidfile} \
+ --exec ${command} \
+ -- \
+ --daemon --pidfile ${pidfile} ${VLC_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ start-stop-daemon --stop \
+ --pidfile ${pidfile}
+ eend $?
+}