diff --git a/debian/ngcp-rtpengine-daemon.postinst b/debian/ngcp-rtpengine-daemon.postinst index f7be6d0b0..00d8b51d2 100644 --- a/debian/ngcp-rtpengine-daemon.postinst +++ b/debian/ngcp-rtpengine-daemon.postinst @@ -37,12 +37,11 @@ if [ "$1" = configure ]; then --no-create-home --disabled-password \ --group --quiet rtpengine || true - for DIR in /var/spool/rtpengine; do - if ! dpkg-statoverride --list "$DIR" > /dev/null 2>&1; then - chown rtpengine:rtpengine "$DIR" - chmod 0770 "$DIR" - fi - done + rtpdir='/var/spool/rtpengine' + if ! dpkg-statoverride --list "$rtpdir" > /dev/null 2>&1; then + chown rtpengine:rtpengine "$rtpdir" + chmod 0770 "$rtpdir" + fi fi #DEBHELPER# diff --git a/debian/ngcp-rtpengine-recording-daemon.postinst b/debian/ngcp-rtpengine-recording-daemon.postinst index fe6c81571..a3c052e1c 100644 --- a/debian/ngcp-rtpengine-recording-daemon.postinst +++ b/debian/ngcp-rtpengine-recording-daemon.postinst @@ -3,12 +3,11 @@ set -e if [ "$1" = configure ]; then - for DIR in /var/lib/rtpengine-recording; do - if ! dpkg-statoverride --list "$DIR" > /dev/null 2>&1; then - chown rtpengine:rtpengine "$DIR" - chmod 0770 "$DIR" - fi - done + rtpdir='/var/lib/rtpengine-recording' + if ! dpkg-statoverride --list "$rtpdir" > /dev/null 2>&1; then + chown rtpengine:rtpengine "$rtpdir" + chmod 0770 "$rtpdir" + fi fi #DEBHELPER#