summaryrefslogtreecommitdiff
path: root/debian/fingerd.postinst
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2019-02-08 05:14:29 +0000
committerKatolaZ <katolaz@freaknet.org>2019-02-08 05:14:29 +0000
commit9696842a61b6608f10633a984732a145c4fe5c68 (patch)
treec715b7439c3bb1d5d5eb09540952da6adc62a0d3 /debian/fingerd.postinst
parent172540a4a29fa4c0c5f0431bb5bf5b3d08ec92c0 (diff)
add debian/ folder
Diffstat (limited to 'debian/fingerd.postinst')
-rw-r--r--debian/fingerd.postinst33
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/fingerd.postinst b/debian/fingerd.postinst
new file mode 100644
index 0000000..afe09b7
--- /dev/null
+++ b/debian/fingerd.postinst
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+enable_if_alone() {
+ if ! grep -q ^finger /etc/inetd.conf; then
+ update-inetd --pattern /usr/sbin/in\\.fingerd --enable finger
+ fi
+}
+
+case "$1" in
+abort-upgrade | abort-deconfigure | abort-remove)
+ enable_if_alone
+ ;;
+configure)
+ if [ -n "$2" ]; then
+ enable_if_alone
+ else
+ fingerentry="finger stream tcp nowait nobody /usr/sbin/tcpd /usr/sbin/in.fingerd"
+ if grep -q ^finger /etc/inetd.conf; then
+ update-inetd --group INFO --add "#$fingerentry"
+ else
+ update-inetd --group INFO --add "$fingerentry"
+ fi
+ fi
+ ;;
+*)
+ printf "$0: incorrect arguments: $*\n" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#