summaryrefslogtreecommitdiff
path: root/pinyconfigs/debian/pinyconfigs.postrm
diff options
context:
space:
mode:
Diffstat (limited to 'pinyconfigs/debian/pinyconfigs.postrm')
-rwxr-xr-xpinyconfigs/debian/pinyconfigs.postrm34
1 files changed, 34 insertions, 0 deletions
diff --git a/pinyconfigs/debian/pinyconfigs.postrm b/pinyconfigs/debian/pinyconfigs.postrm
new file mode 100755
index 0000000..ac69cc8
--- /dev/null
+++ b/pinyconfigs/debian/pinyconfigs.postrm
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+
+ remove)
+
+ dpkg-divert --divert /etc/apache2/envvars.default --package pinyconfigs --remove /etc/apache2/envvars
+ dpkg-divert --divert /etc/cgitrc.default --package pinyconfigs --remove /etc/cgitrc
+ dpkg-divert --divert /etc/sv/git-daemon/run.default --package pinyconfigs --remove /etc/sv/git-daemon/run
+
+ ;;
+
+ purge)
+
+ if [ -e /etc/apache2/envvars.default ]; then
+ mv /etc/apache2/envvars.default /etc/apache2/envvars
+ fi
+
+ if [ -e /etc/cgitrc.default ]; then
+ mv /etc/cgitrc.default /etc/cgitrc
+ fi
+
+ if [ -e /etc/sv/git-daemon/run.default ]; then
+ mv /etc/sv/git-daemon/run.default /etc/sv/git-daemon/run
+ fi
+
+ ;;
+
+ *)
+ ;;
+
+esac