summarylogtreecommitdiffstats
path: root/warsaw-bin.install
blob: f9b72a3cee2d535e9a7bc228eb0559f295d7f3aa (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
post_install() {
    if [ "$(locale | grep "LANG")" = "LANG=pt_BR.UTF-8" ]; then
        echo -e "\e[34;1m==>\e[39;1m Reinicie o sistema e conclua a configuraĆ§Ć£o do seu banco no site abaixo: \e[0m"
        echo -e "\e[34;1m==>\e[39;1m https://diagnostico.gasantifraud.com \e[0m"
    else
        echo -e "\e[34;1m==>\e[39;1m Restart the system and complete your bank setup on the website below: \e[0m"
        echo -e "\e[34;1m==>\e[39;1m https://diagnostico.gasantifraud.com \e[0m"
    fi

    systemctl enable --now warsaw.service
}

post_upgrade() {
    if systemctl is-active warsaw.service 1>/dev/null; then
        systemctl daemon-reload
        systemctl restart warsaw.service
    fi
}

pre_remove() {
    if systemctl is-enabled warsaw.service 1>/dev/null; then
        systemctl disable --now warsaw.service
    fi
}

post_remove() {
    if [ -e "/usr/local/etc/warsaw" ]; then
        rm -rf /usr/local/etc/warsaw
    fi
}