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.postrm26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/openssh-server.postrm b/debian/openssh-server.postrm
new file mode 100644
index 000000000..862c51520
--- /dev/null
+++ b/debian/openssh-server.postrm
@@ -0,0 +1,26 @@
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 rmdir --ignore-fail-on-non-empty /etc/ssh
16fi
17
18if [ "$1" = "purge" ] ; then
19 update-rc.d ssh remove >/dev/null
20fi
21
22if [ "$1" = "purge" ] ; then
23 deluser --quiet sshd > /dev/null || true
24fi
25
26exit 0