summaryrefslogtreecommitdiff
path: root/raveos-updater/raveos-updater.install
blob: f2993fd938b83e30f99623ecaf02270d9257b561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
_enable() {
    if command -v systemctl >/dev/null 2>&1; then
        systemctl daemon-reload >/dev/null 2>&1 || true
        systemctl enable --now raveos-updater.timer >/dev/null 2>&1 || true
    fi
}

post_install() {
    _enable
}

post_upgrade() {
    _enable
}

pre_remove() {
    if command -v systemctl >/dev/null 2>&1; then
        systemctl disable --now raveos-updater.timer >/dev/null 2>&1 || true
    fi
}