initial import
This commit is contained in:
19
dnsmasq/dnsmasq.install
Normal file
19
dnsmasq/dnsmasq.install
Normal file
@@ -0,0 +1,19 @@
|
||||
post_install() {
|
||||
if ! getent passwd dnsmasq &>/dev/null; then
|
||||
useradd -r -d / -c 'dnsmasq daemon' -s /bin/nologin dnsmasq >/dev/null
|
||||
fi
|
||||
dnsmasq_shell=$(getent passwd dnsmasq | cut -d: -f7)
|
||||
if [ "$dnsmasq_shell" != '/bin/nologin' ]; then
|
||||
chsh -s /bin/nologin dnsmasq &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
if getent passwd dnsmasq &>/dev/null; then
|
||||
userdel dnsmasq >/dev/null
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user