Create the json output directory if it doesn't exist
This commit is contained in:
parent
e7db494b18
commit
2109b1d041
|
|
@ -36,6 +36,10 @@ case "$1" in
|
||||||
|
|
||||||
# Make sure the "data" directory is owned by dump1090 so the dump1090-fa process has write access
|
# Make sure the "data" directory is owned by dump1090 so the dump1090-fa process has write access
|
||||||
jsondir="/usr/share/dump1090-fa/html/data"
|
jsondir="/usr/share/dump1090-fa/html/data"
|
||||||
|
if [ ! -d ${jsondir} ]; then
|
||||||
|
echo "Creating directory ${jsondir}..." >&2
|
||||||
|
mkdir ${jsondir}
|
||||||
|
fi
|
||||||
if [ -d ${jsondir} ]; then
|
if [ -d ${jsondir} ]; then
|
||||||
echo "Changing permissions on ${jsondir}..." >&2
|
echo "Changing permissions on ${jsondir}..." >&2
|
||||||
chown ${RUNAS}:nogroup ${jsondir}
|
chown ${RUNAS}:nogroup ${jsondir}
|
||||||
|
|
@ -90,7 +94,6 @@ case "$1" in
|
||||||
echo "Starting the dump1090-fa service..." >&2
|
echo "Starting the dump1090-fa service..." >&2
|
||||||
systemctl restart dump1090-fa
|
systemctl restart dump1090-fa
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue