postinst, postrm, prerm scripts v0.1-2
authorTuomo Tanskanen <ext-tuomo.1.tanskanen@nokia.com>
Mon, 1 Mar 2010 12:21:47 +0000 (14:21 +0200)
committerTuomo Tanskanen <ext-tuomo.1.tanskanen@nokia.com>
Mon, 1 Mar 2010 12:21:47 +0000 (14:21 +0200)
debian/postinst [new file with mode: 0644]
debian/postrm [new file with mode: 0644]
debian/prerm [new file with mode: 0644]

diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..fe98d6c
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+DAEMON=/usr/bin/nowplayingd
+DSMETOOL=/usr/sbin/dsmetool
+DSMETOOL_PARAMETERS="-t"
+
+if [ -x $DAEMON ]; then
+       echo "Starting nowplayingd..."
+       $DSMETOOL $DSMETOOL_PARAMETERS $DAEMON
+fi
diff --git a/debian/postrm b/debian/postrm
new file mode 100644 (file)
index 0000000..6dcda15
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+
+if [ -f /etc/X11/Xsession.d/99nowplayingd ]; then
+       rm -f /etc/X11/Xsession.d/99nowplayingd || true
+fi
diff --git a/debian/prerm b/debian/prerm
new file mode 100644 (file)
index 0000000..0e5a1bd
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+DAEMON=/usr/bin/nowplayingd
+DSMETOOL=/usr/sbin/dsmetool
+DSMETOOL_PARAMETERS="-k"
+
+if [ -x $DAEMON ]; then
+       echo "Stopping nowplayingd..."
+       $DSMETOOL $DSMETOOL_PARAMETERS $DAEMON || true
+fi