summarylogtreecommitdiffstats
path: root/servicewall.install
blob: 979a3731ab69998acbfe72b01f399dafbe87783d (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
## $1:  the new package version
post_install() {
    sw status | grep -q "enabled" || (
        echo -e "To enable ServiceWall, run a\n\t# systemctl enable servicewall";
    )
    echo -e "If you installed python-argcomplete, you should run\n\t# activate-global-python-argcomplete"
    echo "You should set XTABLES_LIBDIR inside /etc/environment to relevant dir."
}

## $1:  the new package version
## $2:  the old package version
post_upgrade() {
    # If ServiceWall is not disabled :
    sw status | grep -q "disabled" || (
        echo "reloading ServiceWall";
        sw reload;
    )
    echo "You should set XTABLES_LIBDIR inside /etc/environment to relevant dir."
}

## arg 1:  the old package version
pre_remove() {
    echo "disabling ServiceWall";
    sw disable;
}