blob: a062dc15629826c795471a76b7ab7fe8a18f3dee (
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
|
_add_server_user() {
if ! getent passwd unvanquished >/dev/null; then
useradd -rM -d /var/lib/unvanquished-server -c "Unvanquished dedicated server" -s /bin/false unvanquished
fi
}
_delete_server_user() {
if getent passwd unvanquished >/dev/null; then
userdel unvanquished
groupdel unvanquished
fi
}
_chown_server_home() {
chown -R unvanquished:unvanquished /var/lib/unvanquished-server
}
post_install() {
_add_server_user
_chown_server_home
}
post_remove() {
_delete_server_user
}
|