#!/bin/sh -e setperm() { local user="${1}" local group="${2}" local mode="${3}" local file="${4}" shift 4 # only do something when no setting exists if ! dpkg-statoverride --list "${file}" >/dev/null 2>&1 then if [ -e "${file}" ] then chown "${user}":"${group}" "${file}" chmod "${mode}" "${file}" fi fi } case "${1}" in remove) if [ -e /var/lib/nagios4/rw ] then setperm nagios www-data 0700 /var/lib/nagios4/rw fi ;; esac # Automatically added by dh_apache2/UNDECLARED if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then if true; then if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper for conf in nagios4-cgi ; do apache2_invoke disconf $conf || exit 1 done fi fi fi # End automatically added section