summaryrefslogtreecommitdiff
path: root/extra/dnsmasq/dnsmasq.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-09-12 23:14:44 +0000
committerroot <root@rshg054.dnsready.net>2011-09-12 23:14:44 +0000
commitb3a841a1f66eff75be29fba090b83ce4322d4721 (patch)
treef91ebd6bbbf3590fc3ca861c5b209e408d22b39b /extra/dnsmasq/dnsmasq.install
parent1d2f1a1e70011a41d17f2f16d5e90c491ccdabb8 (diff)
Mon Sep 12 23:14:44 UTC 2011
Diffstat (limited to 'extra/dnsmasq/dnsmasq.install')
-rw-r--r--extra/dnsmasq/dnsmasq.install21
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
+}