summaryrefslogtreecommitdiffstats
path: root/abs/extra/dnsmasq/dnsmasq.install
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-07 19:44:50 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-07 19:44:50 (GMT)
commitc7d5220cabb6b67862e1bfa188c07e0d3821a294 (patch)
treef36132c071183cd86a6f7dd720ea054c74e1c9f0 /abs/extra/dnsmasq/dnsmasq.install
parentfb1608aa973e24afe26c8fc754ddd11d9466d8ca (diff)
downloadlinhes_pkgbuild-c7d5220cabb6b67862e1bfa188c07e0d3821a294.zip
linhes_pkgbuild-c7d5220cabb6b67862e1bfa188c07e0d3821a294.tar.gz
linhes_pkgbuild-c7d5220cabb6b67862e1bfa188c07e0d3821a294.tar.bz2
dnsmasq 2.62
Diffstat (limited to 'abs/extra/dnsmasq/dnsmasq.install')
-rw-r--r--abs/extra/dnsmasq/dnsmasq.install21
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
+}