aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-04-08 14:49:25 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-04-08 14:55:05 +0100
commit850661d19ded5181693ba6abf6bca799f4529854 (patch)
tree7a01206c560f9aa940ecb16ae171225545673426
parent2405328e2687ff6ef627213b49ddc00a99a9be7b (diff)
downloadnyancat-850661d19ded5181693ba6abf6bca799f4529854.tar.gz
Add postinst and postrm
-rw-r--r--debian/nyancat.postinst9
-rw-r--r--debian/nyancat.postrm24
2 files changed, 33 insertions, 0 deletions
diff --git a/debian/nyancat.postinst b/debian/nyancat.postinst
new file mode 100644
index 0000000..14fc4eb
--- /dev/null
+++ b/debian/nyancat.postinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+# Set up nyancat
+update-inetd --group OTHER --add \
+ '#nyancat\t\tstream\ttcp\tnowait\tnobody\t/usr/bin/nyancat\tnyancat-t'
+
+#DEBHELPER#
diff --git a/debian/nyancat.postrm b/debian/nyancat.postrm
new file mode 100644
index 0000000..3f8b5d4
--- /dev/null
+++ b/debian/nyancat.postrm
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ purge)
+ if [ -x /usr/sbin/update-inetd ]; then
+ update-inetd --remove nyancat
+ fi
+ ;;
+ remove)
+ update-inetd --disable nyancat
+ ;;
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+ *)
+ echo "$0: unknown action \"$1\""
+ exit 0
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0