From f8a78a25b6d529e7798b78b1eb116e7430d70bf6 Mon Sep 17 00:00:00 2001 From: Tuomo Tanskanen Date: Mon, 1 Mar 2010 14:21:47 +0200 Subject: [PATCH] postinst, postrm, prerm scripts --- debian/postinst | 10 ++++++++++ debian/postrm | 5 +++++ debian/prerm | 10 ++++++++++ 3 files changed, 25 insertions(+) create mode 100644 debian/postinst create mode 100644 debian/postrm create mode 100644 debian/prerm diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..fe98d6c --- /dev/null +++ b/debian/postinst @@ -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 index 0000000..6dcda15 --- /dev/null +++ b/debian/postrm @@ -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 index 0000000..0e5a1bd --- /dev/null +++ b/debian/prerm @@ -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 -- 1.7.9.5