diff --git a/debian/dump1090-fa.postinst b/debian/dump1090-fa.postinst index d2698ef..89fc579 100644 --- a/debian/dump1090-fa.postinst +++ b/debian/dump1090-fa.postinst @@ -36,6 +36,10 @@ case "$1" in # Make sure the "data" directory is owned by dump1090 so the dump1090-fa process has write access jsondir="/usr/share/dump1090-fa/html/data" + if [ ! -d ${jsondir} ]; then + echo "Creating directory ${jsondir}..." >&2 + mkdir ${jsondir} + fi if [ -d ${jsondir} ]; then echo "Changing permissions on ${jsondir}..." >&2 chown ${RUNAS}:nogroup ${jsondir} @@ -90,7 +94,6 @@ case "$1" in echo "Starting the dump1090-fa service..." >&2 systemctl restart dump1090-fa - ;; abort-upgrade|abort-remove|abort-deconfigure)