diff --git a/debian/ngcp-rtpengine-daemon.dirs b/debian/ngcp-rtpengine-daemon.dirs new file mode 100644 index 000000000..353740ab6 --- /dev/null +++ b/debian/ngcp-rtpengine-daemon.dirs @@ -0,0 +1 @@ +var/spool/rtpengine diff --git a/debian/ngcp-rtpengine-daemon.postinst b/debian/ngcp-rtpengine-daemon.postinst index aebf1b426..f7be6d0b0 100644 --- a/debian/ngcp-rtpengine-daemon.postinst +++ b/debian/ngcp-rtpengine-daemon.postinst @@ -36,6 +36,13 @@ if [ "$1" = configure ]; then adduser --system --home /nonexistent --gecos rtpengine \ --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 fi #DEBHELPER# diff --git a/debian/ngcp-rtpengine-recording-daemon.dirs b/debian/ngcp-rtpengine-recording-daemon.dirs index b7df8da6e..6d923d3dd 100644 --- a/debian/ngcp-rtpengine-recording-daemon.dirs +++ b/debian/ngcp-rtpengine-recording-daemon.dirs @@ -1,2 +1 @@ var/lib/rtpengine-recording -var/spool/rtpengine diff --git a/debian/ngcp-rtpengine-recording-daemon.postinst b/debian/ngcp-rtpengine-recording-daemon.postinst index a85dbebdb..fe6c81571 100644 --- a/debian/ngcp-rtpengine-recording-daemon.postinst +++ b/debian/ngcp-rtpengine-recording-daemon.postinst @@ -3,7 +3,7 @@ set -e if [ "$1" = configure ]; then - for DIR in /var/lib/rtpengine-recording /var/spool/rtpengine; do + 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"