summaryrefslogtreecommitdiff
path: root/pinyconfigs/debian/pinyconfigs.postrm
blob: ac69cc8e04f2d322687dabd41af73bd2f29e3b21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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