summaryrefslogtreecommitdiff
path: root/p2pvr/etc/init.d/p2pvrd
diff options
context:
space:
mode:
Diffstat (limited to 'p2pvr/etc/init.d/p2pvrd')
-rwxr-xr-xp2pvr/etc/init.d/p2pvrd26
1 files changed, 26 insertions, 0 deletions
diff --git a/p2pvr/etc/init.d/p2pvrd b/p2pvr/etc/init.d/p2pvrd
new file mode 100755
index 0000000..04aeaa8
--- /dev/null
+++ b/p2pvr/etc/init.d/p2pvrd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting P2PVR daemon"
+ start-stop-daemon --start --exec /usr/bin/p2daemon --pidfile /run/p2pvr/p2pvrdaemon.pid -- \
+ --library libp2pvrdaemon.so \
+ --daemon.type p2pvrdaemon \
+ --file.options.read /etc/p2pvr/p2config \
+ --daemon.setuser p2pvr \
+ --daemon.setgroup video \
+ --daemon.pidfile /run/p2pvr/p2pvrdaemon.pid \
+ --daemon.daemonize
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping P2PVR daemon"
+ start-stop-daemon --signal TERM /usr/bin/p2daemon --pidfile /run/p2pvr/p2pvrdaemon.pid
+ eend $?
+}
+
+