diff options
-rw-r--r-- | p2pvr/Jamfile.jam | 1 | ||||
-rwxr-xr-x | p2pvr/etc/init.d/p2pvrcardd | 26 | ||||
-rwxr-xr-x | p2pvr/etc/init.d/p2pvrd | 26 | ||||
-rw-r--r-- | p2pvr/etc/p2config | 8 | ||||
-rw-r--r-- | p2pvr/lib/daemonBase.cpp | 1 |
5 files changed, 62 insertions, 0 deletions
diff --git a/p2pvr/Jamfile.jam b/p2pvr/Jamfile.jam index 53070ac..3fe2894 100644 --- a/p2pvr/Jamfile.jam +++ b/p2pvr/Jamfile.jam @@ -53,5 +53,6 @@ generators.register [ new sql-generator sql.sql2o : SQL : OBJ ] ; actions sql.sql2o { ld -r -b binary -o $(1) $(2) + objcopy --add-section .note.GNU-stack=/dev/null $(1) $(1) } IMPORT $(__name__) : sql.sql2o : : sql.sql2o ; diff --git a/p2pvr/etc/init.d/p2pvrcardd b/p2pvr/etc/init.d/p2pvrcardd new file mode 100755 index 0000000..4014ef9 --- /dev/null +++ b/p2pvr/etc/init.d/p2pvrcardd @@ -0,0 +1,26 @@ +#!/sbin/runscript + +depend() { + use net +} + +start() { + ebegin "Starting P2PVR card daemon" + start-stop-daemon --start --exec /usr/bin/p2daemon --pidfile /run/p2pvr/p2pvrcarddaemon.pid -- \ + --library libp2pvrcarddaemon.so \ + --daemon.type p2pvrcarddaemon \ + --file.options.read /etc/p2pvr/p2config \ + --daemon.setuser p2pvr \ + --daemon.setgroup video \ + --daemon.pidfile /run/p2pvr/p2pvrcarddaemon.pid \ + --daemon.daemonize + eend $? +} + +stop() { + ebegin "Stopping P2PVR card daemon" + start-stop-daemon --signal TERM /usr/bin/p2daemon --pidfile /run/p2pvr/p2pvrcarddaemon.pid + eend $? +} + + 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 $? +} + + diff --git a/p2pvr/etc/p2config b/p2pvr/etc/p2config new file mode 100644 index 0000000..07c2e76 --- /dev/null +++ b/p2pvr/etc/p2config @@ -0,0 +1,8 @@ +common.datasourceRoot = /etc/p2pvr/datasources +p2pvr.localdevices.frontend = /dev/dvb/adapter0/frontend0 +p2pvr.globaldevices.carddaemon = Devices:default -h localhost -p 10000 +p2pvr.storage.root = /var/store/p2pvr/recordings +p2pvr.recorder.muxercommand = /usr/bin/ffmpeg -f mpegts -i - -f dvd -codec copy - +p2pvr.recorder.extension = mpg +common.syslog.level = 4 +common.syslog.ident = p2pvr diff --git a/p2pvr/lib/daemonBase.cpp b/p2pvr/lib/daemonBase.cpp index 1e946d8..4739498 100644 --- a/p2pvr/lib/daemonBase.cpp +++ b/p2pvr/lib/daemonBase.cpp @@ -39,6 +39,7 @@ void DaemonBase::shutdown() const { ic->shutdown(); + ic->waitForShutdown(); } Ice::InitializationData |