blob: 42615708110f2ee257c299765d84f8fca7fdae14 (
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
28
29
30
31
|
# arg 1: the new package version
pre_install() {
# Create User/Group
getent group bareos > /dev/null || groupadd --system bareos
getent passwd bareos > /dev/null || useradd --system --gid bareos \
--home-dir /var/lib/bareos --no-create-home bareos
}
# arg 1: the new package version
post_install() {
chown bareos:bareos /var/lib/bareos/
chown bareos:bareos /run/bareos/
#chown bareos:bareos /var/log/bareos/
}
# arg 1: the new package version
# arg 2: the old package version
pre_upgrade() {
pre_install
}
post_upgrade() {
post_install
}
# arg 1: the old package version
post_remove() {
getent passwd bareos > /dev/null && userdel bareos
rm -f /etc/bareos/.rndpwd
}
|