summarylogtreecommitdiffstats
path: root/pacman-auto-update.install
blob: 117e802f37f921699447bda70eb5b20575529bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
post_install() {    
    systemctl enable --now pacman-auto-update.timer || true
}

post_upgrade() {
    systemctl --system daemon-reload >/dev/null || true
    systemctl restart pacman-auto-update.timer || true
}

pre_remove() {
    if [ -d /run/systemd/system ]; then
        systemctl disable --now pacman-auto-update.timer >/dev/null
    fi
}

post_remove() {
    # In case this system is running systemd, we make systemd reload the unit files                                     
    # to pick up changes.                                                                                               
    if [ -d /run/systemd/system ] ; then                                                                                
        systemctl --system daemon-reload >/dev/null || true                                                             
    fi           
}