blob: 5c6533dc9ef65948c1ef7cef22f525381c5d1ecd (
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
|
_DIR='/var/lib/tuptime'
post_install() {
echo -e '\nActivate using: \nsystemctl enable --now tuptime-sync.timer tuptime.service \n'
/usr/bin/systemd-sysusers
install -o _tuptime -g _tuptime -m 0755 -d ${_DIR}
}
post_upgrade() {
! id tuptime &>/dev/null || echo -e '\nUser "tuptime" was replaced with "_tuptime", you may remove it. \n'
/usr/bin/systemd-sysusers
if [ -d ${_DIR} ]; then
chmod 0755 ${_DIR}
chown -R _tuptime:_tuptime ${_DIR}
else
install -o _tuptime -g _tuptime -m 0755 -d ${_DIR}
fi
}
post_remove() {
rm -rf ${_DIR}
! id _tuptime &>/dev/null || userdel -f _tuptime
}
# vim: ts=4 sw=4 et:
|