diff options
Diffstat (limited to 'abs/extra/dnsmasq/dnsmasq.install')
-rw-r--r-- | abs/extra/dnsmasq/dnsmasq.install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/abs/extra/dnsmasq/dnsmasq.install b/abs/extra/dnsmasq/dnsmasq.install new file mode 100644 index 0000000..c2edb7d --- /dev/null +++ b/abs/extra/dnsmasq/dnsmasq.install @@ -0,0 +1,21 @@ +#!/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 +} |