blob: f4b62ed17d469be8e90e064aa071e0cdcb333973 (
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
|
post_install() {
if grep -q "^asf" /etc/group &> /dev/null ; then
groupmod -n asf asf &> /dev/null
else
groupadd -r asf &> /dev/null
fi
if grep -q "^asf:" /etc/passwd 2> /dev/null ; then
usermod -s /bin/false -c "ArchiSteamFarm daemon" -d /opt/asf -g asf asf &> /dev/null
else
useradd -s /bin/false -c "ArchiSteamFarm daemon user" -d /opt/asf -g asf -r asf &> /dev/null
fi
chown -R asf: /opt/asf
}
post_upgrade() {
post_install $1
}
post_remove() {
if grep -q "^asf:" /etc/passwd 2> /dev/null ; then
userdel asf &> /dev/null
fi
if grep -q "^asf" /etc/group &> /dev/null ; then
groupdel asf &> /dev/null
fi
}
|