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

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

    # Reload systemctl
    systemctl daemon-reload

    echo "Adding pingormail in systemctl:"
    echo "  systemctl enable pingormail.timer"
    echo "  systemctl start pingormail.timer"

    true
}

post_upgrade() {
    # Reload systemctl
    systemctl daemon-reload

    #echo "You should restart pingormail.timer"
    #echo "  systemctl restart pingormail.timer"

    true
}

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

    true
}