mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 19:54:36 +08:00
22 lines
316 B
Plaintext
22 lines
316 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
add_dnsmasq_user() {
|
||
|
if ! getent passwd dnsmasq >/dev/null; then
|
||
|
useradd -r -d / -c 'dnsmasq daemon' -s /sbin/nologin dnsmasq
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
post_install() {
|
||
|
add_dnsmasq_user
|
||
|
}
|
||
|
|
||
|
post_upgrade() {
|
||
|
add_dnsmasq_user
|
||
|
}
|
||
|
|
||
|
post_remove() {
|
||
|
if getent passwd dnsmasq >/dev/null; then
|
||
|
userdel dnsmasq
|
||
|
fi
|
||
|
}
|