diff options
author | root <root@rshg054.dnsready.net> | 2011-09-12 23:14:44 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-09-12 23:14:44 +0000 |
commit | b3a841a1f66eff75be29fba090b83ce4322d4721 (patch) | |
tree | f91ebd6bbbf3590fc3ca861c5b209e408d22b39b /extra/dnsmasq/dnsmasq.install | |
parent | 1d2f1a1e70011a41d17f2f16d5e90c491ccdabb8 (diff) |
Mon Sep 12 23:14:44 UTC 2011
Diffstat (limited to 'extra/dnsmasq/dnsmasq.install')
-rw-r--r-- | extra/dnsmasq/dnsmasq.install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/dnsmasq/dnsmasq.install b/extra/dnsmasq/dnsmasq.install new file mode 100644 index 000000000..c2edb7db5 --- /dev/null +++ b/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 +} |