summarylogtreecommitdiffstats
path: root/filteripdyn.install
blob: 683276c4a02fdc99180461ee83198c44088f9c6a (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
post_install() {
    pkgname=filteripdyn

    # Fixing membership
    chown root: /var/log/$pkgname
    chown -R root: /etc/$pkgname

    # Reload systemctl
    systemctl daemon-reload

    echo "Adding filteripdyn in systemctl:"
    echo "  systemctl enable filteripdyn"
    echo "  systemctl start filteripdyn"

    true
}

post_upgrade() {
    # Reload systemctl
    systemctl daemon-reload

    echo "You should restart iptables, filteripdyn, …"
    echo "  systemctl restart iptables"
    echo "  systemctl restart filteripdyn"

    true
}

pre_remove() {
    pkgname=filteripdyn
    # Remove symlink in systemd
    systemctl disable $pkgname
    # Stop server
    systemctl stop $pkgname
    # Reload systemctl
    systemctl daemon-reload

    true
}