File: prerm

package info (click to toggle)
biomaj-watcher 1.2.2-2
  • links: PTS, VCS
  • area: contrib
  • in suites: jessie, jessie-kfreebsd
  • size: 117,388 kB
  • ctags: 15,418
  • sloc: java: 62,369; xml: 1,364; sh: 160; makefile: 19
file content (53 lines) | stat: -rwxr-xr-x 988 bytes parent folder | download | duplicates (3)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

unset_perms() {
    find $1 | xargs -n 1 /usr/share/biomaj-watcher/bin/unsetperms.sh
}


case "$1" in
    remove)
      # Update configuration files
      unset_perms /etc/biomaj/db_properties/
      # Update generated banks
      unset_perms /var/lib/biomaj/
      # Update logs
      unset_perms /var/log/biomaj/
    ;;
    *)
    ;;
esac    

case "$1" in
    upgrade)
    ;;
    remove|upgrade|deconfigure)
      # Remove post installation created files

      # Remove admin credentials
      if [ -e /usr/share/biomaj/.bmajwatcherpasswd ]; then
         rm /usr/share/biomaj/.bmajwatcherpasswd
      fi

      if [ -e /usr/share/biomaj-watcher/bin/WatcherConfigurator.class ]; then
         rm /usr/share/biomaj-watcher/bin/WatcherConfigurator.class
      fi

    ;;

    failed-upgrade)
    ;;

    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac


#DEBHELPER#