summaryrefslogtreecommitdiff
path: root/debian/openssh-server.postrm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/openssh-server.postrm')
-rw-r--r--debian/openssh-server.postrm27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/openssh-server.postrm b/debian/openssh-server.postrm
new file mode 100644
index 000000000..e7a437260
--- /dev/null
+++ b/debian/openssh-server.postrm
@@ -0,0 +1,27 @@
1#!/bin/sh -e
2
3#DEBHELPER#
4
5if [ "$1" = "purge" ]
6then
7 # Remove all non-conffiles that ssh might create, so that we can
8 # smoothly remove /etc/ssh if and only if the user hasn't dropped some
9 # other files in there. Conffiles have already been removed at this
10 # point.
11 rm -f /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.pub
12 rm -f /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_rsa_key.pub
13 rm -f /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_dsa_key.pub
14 rm -f /etc/ssh/sshd_config
15 rm -f /etc/ssh/sshd_not_to_be_run
16 rmdir --ignore-fail-on-non-empty /etc/ssh
17fi
18
19if [ "$1" = "purge" ] ; then
20 update-rc.d ssh remove >/dev/null
21fi
22
23if [ "$1" = "purge" ] ; then
24 deluser --quiet sshd > /dev/null || true
25fi
26
27exit 0