case "$1" in
configure)
- addgroup --system pdns
- adduser --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
+ if [ -z "`getent group pdns`" ]; then
+ addgroup --system pdns
+ fi
+ if [ -z "`getent passwd pdns`" ]; then
+ adduser --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
+ fi
if [ "`stat -c '%U:%G' /etc/powerdns/recursor.conf`" = "root:root" ]; then
chown root:pdns /etc/powerdns/recursor.conf
# Make sure that pdns can read it; the default used to be 0600
case "$1" in
configure)
- addgroup --system pdns
- adduser --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
+ if [ -z "`getent group pdns`" ]; then
+ addgroup --system pdns
+ fi
+ if [ -z "`getent passwd pdns`" ]; then
+ adduser --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
+ fi
if [ "`stat -c '%U:%G' /etc/powerdns/recursor.conf`" = "root:root" ]; then
chown root:pdns /etc/powerdns/recursor.conf
# Make sure that pdns can read it; the default used to be 0600
case "$1" in
configure)
- addgroup --system pdns
- adduser --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
+ if [ -z "`getent group pdns`" ]; then
+ addgroup --system pdns
+ fi
+ if [ -z "`getent passwd pdns`" ]; then
+ adduser --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
+ fi
if [ "`stat -c '%U:%G' /etc/powerdns/recursor.conf`" = "root:root" ]; then
chown root:pdns /etc/powerdns/recursor.conf
# Make sure that pdns can read it; the default used to be 0600