summarylogtreecommitdiffstats
path: root/pacman-auto-update.install
blob: ad57842cea8772559839da99d433a94b65898373 (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
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 stop pacman-auto-update.timer >/dev/null
    fi
}

post_remove() {
    if [ -d /run/systemd/system ]; then                                                                                 
        systemctl --system daemon-reload >/dev/null || true                                                             
    fi                                                                                                                  
                                                                                                                        
    # 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           
}