summarylogtreecommitdiffstats
path: root/tuptime.install
blob: 12d5a31f3c8b5c05560f16e75fd23caa256b1514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
post_install() {
    echo -e '\nActivate using: \nsystemctl enable --now tuptime-sync.timer tuptime.service\n'
}

post_upgrade() {
    local DB='/var/lib/tuptime/tuptime.db'
    if [ -f ${DB} ]; then
        [ "$(stat -c '%U' ${DB})" == '_tuptime' ] || { systemd-sysusers && chown _tuptime:_tuptime ${DB}; }
    fi
    ! id tuptime &>/dev/null || echo -e '\nUser "tuptime" was replaced with "_tuptime", you may remove it.\n'
}

# vim: ts=4 sw=4 et: