summarylogtreecommitdiffstats
path: root/vrk-mpollux-digisign-client.install
blob: 29f63f9ad9a68a675caa87bc3f7b0bda43936ef3 (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
pre_install() {
    ps -ef | grep DigiSignApplication | grep -v grep | awk '{print $2}' | xargs -r kill -9 > /dev/null 2>&1
}

pre_upgrade() {
    ps -ef | grep DigiSignApplication | grep -v grep | awk '{print $2}' | xargs -r kill -9 > /dev/null 2>&1
}

post_install() {
    if [ ! -d /tmp/.digisign_logs ]; then
        mkdir -p /tmp/.digisign_logs
        chmod 777 /tmp/.digisign_logs
    fi

    exec > /tmp/.digisign_logs/postinst.log 2>&1

    set -x

    ldconfig

    #old certificate will be removed after uninstall
    /usr/bin/DigiSignApplication.bin /Install

    if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
}

post_upgrade() {
    echo 'If a password prompt appears on launch, remove $HOME/.digisign and $HOME/.pki/nssdb'

    if [ ! -d /tmp/.digisign_logs ]; then
        mkdir -p /tmp/.digisign_logs
        chmod 777 /tmp/.digisign_logs
    fi

    exec > /tmp/.digisign_logs/postinst.log 2>&1

    set -x

    ldconfig

    #old certificate will be removed after uninstall
    /usr/bin/DigiSignApplication.bin /Install

    if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
}

post_rm() {
    ldconfig
    ps -ef | grep DigiSignApplication | grep -v grep | awk '{print $2}' | xargs -r kill -9  > /dev/null 2>&1

    rm /etc/xdg/Fujitsu/Seed.txt
    rm /etc/xdg/Fujitsu/SSLCA.cer
    rm /etc/xdg/Fujitsu/SSL.p12
    rm -rf /tmp/.digisign_logs
    rm `find /home -name ds_nssdinstalled.txt`

    if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
}