adduser --force-badname --system --home /nonexistent --group \
--no-create-home --quiet _dnsdist || true
- if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then
+ if [ -e /etc/dnsdist/dnsdist.conf ] && [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then
chown root:_dnsdist /etc/dnsdist/dnsdist.conf
# Make sure that dnsdist can read it; the default used to be 0600
chmod g+r /etc/dnsdist/dnsdist.conf
fi
- if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.yml`" = "root:root" ]; then
+ if [ -e /etc/dnsdist/dnsdist.yml ] && [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.yml`" = "root:root" ]; then
chown root:_dnsdist /etc/dnsdist/dnsdist.yml
# Make sure that dnsdist can read it; the default used to be 0600
chmod g+r /etc/dnsdist/dnsdist.yml
override_dh_installinit:
# do nothing here. avoids referencing a non-existant init script.
-override_dh_fixperms:
- dh_fixperms
- # these files often contain passwords. 640 as it is chowned to root:_dnsdist
- touch debian/dnsdist/etc/dnsdist/dnsdist.conf
- chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.conf
- touch debian/dnsdist/etc/dnsdist/dnsdist.yml
- chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.yml
-
override_dh_builddeb:
dh_builddeb -- -Zgzip
adduser --force-badname --system --home /nonexistent --group \
--no-create-home --quiet _dnsdist || true
- if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then
+ if [ -e /etc/dnsdist/dnsdist.conf ] && [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then
chown root:_dnsdist /etc/dnsdist/dnsdist.conf
# Make sure that dnsdist can read it; the default used to be 0600
chmod g+r /etc/dnsdist/dnsdist.conf
fi
- if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.yml`" = "root:root" ]; then
+ if [ -e /etc/dnsdist/dnsdist.yml ] && [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.yml`" = "root:root" ]; then
chown root:_dnsdist /etc/dnsdist/dnsdist.yml
# Make sure that dnsdist can read it; the default used to be 0600
chmod g+r /etc/dnsdist/dnsdist.yml
override_dh_installinit:
# do nothing here. avoids referencing a non-existant init script.
-override_dh_fixperms:
- dh_fixperms
- # these files often contain passwords. 640 as it is chowned to root:_dnsdist
- touch debian/dnsdist/etc/dnsdist/dnsdist.conf
- chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.conf
- touch debian/dnsdist/etc/dnsdist/dnsdist.yml
- chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.yml
-
override_dh_builddeb:
dh_builddeb -- -Zgzip