mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-23 18:14:51 +08:00
26 lines
500 B
Plaintext
26 lines
500 B
Plaintext
_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
|
|
}
|