summarylogtreecommitdiffstats
path: root/btrustbiss.install
blob: b3b0e3ff2138d57463e9c24b8be81105e9f88c0a (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
pre_install(){
    set -e
case "$1" in
    install|upgrade)
    ;;
    abort-upgrade)
    ;;
    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
exit 0
}

post_install() {
    set -e
case "$1" in
    configure)
xdg-desktop-menu install /opt/btrustbiss/lib/btrustbiss-BISS.desktop
sudo cp /opt/btrustbiss/lib/btrustbiss-BISS.desktop /etc/xdg/autostart
systemctl enable --now pcscd
    ;;
    abort-upgrade|abort-remove|abort-deconfigure)
    ;;
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
exit 0
}

pre_remove(){
set -e
case "$1" in
    remove|upgrade|deconfigure)
xdg-desktop-menu uninstall /opt/btrustbiss/lib/btrustbiss-BISS.desktop
sudo rm /etc/xdg/autostart/btrustbiss-BISS.desktop
systemctl disable --now pcscd
    ;;
    failed-upgrade)
    ;;
    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
exit 0
}

post_remove() {
    set -e
case "$1" in
    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    ;;
    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
exit 0
}