diff --git a/common.sh b/common.sh index ed44bba..78266a6 100755 --- a/common.sh +++ b/common.sh @@ -29,34 +29,34 @@ FOLDER_DATE="$(date +%Y)/$(date +%m)/$(date +%d)" ## sane checks if [ ! -d "${NOAA_HOME}" ]; then - mkdir -p "${NOAA_HOME}" + mkdir -m 775 -p "${NOAA_HOME}" fi if [ ! -d "${NOAA_OUTPUT}" ]; then - mkdir -p "${NOAA_OUTPUT}" + mkdir -m 775 -p "${NOAA_OUTPUT}" fi if [ ! -d "${METEOR_OUTPUT}" ]; then - mkdir -p "${METEOR_OUTPUT}" + mkdir -m 775 -p "${METEOR_OUTPUT}" fi if [ ! -d "${NOAA_AUDIO}/audio/" ]; then - mkdir -p "${NOAA_AUDIO}/audio/" + mkdir -m 775 -p "${NOAA_AUDIO}/audio/" fi if [ ! -d "${NOAA_OUTPUT}/image/" ]; then - mkdir -p "${NOAA_OUTPUT}/image/" + mkdir -m 775 -p "${NOAA_OUTPUT}/image/" fi if [ ! -d "${NOAA_HOME}/map/" ]; then - mkdir -p "${NOAA_HOME}/map/" + mkdir -m 775 -p "${NOAA_HOME}/map/" fi if [ ! -d "${NOAA_HOME}/predict/" ]; then - mkdir -p "${NOAA_HOME}/predict/" + mkdir -m 775 -p "${NOAA_HOME}/predict/" fi if [ ! -d "${NOAA_OUTPUT}/image/${FOLDER_DATE}" ]; then - mkdir -p "${NOAA_OUTPUT}/image/${FOLDER_DATE}" + mkdir -m 775 -p "${NOAA_OUTPUT}/image/${FOLDER_DATE}" fi diff --git a/receive.sh b/receive.sh index a2529b4..0c9f744 100755 --- a/receive.sh +++ b/receive.sh @@ -28,7 +28,7 @@ fi timeout "${6}" /usr/local/bin/rtl_fm -f "${2}"M -s 60k -g 50 -p 55 -E wav -E deemp -F 9 - | /usr/bin/sox -t raw -e signed -c 1 -b 16 -r 60000 - "${NOAA_AUDIO}/audio/${3}.wav" rate 11025 if [ ! -d "{NOAA_OUTPUT}/image/${FOLDER_DATE}" ]; then - mkdir -p "${NOAA_OUTPUT}/image/${FOLDER_DATE}" + mkdir -m 775 -p "${NOAA_OUTPUT}/image/${FOLDER_DATE}" fi if [ "${SUN_ELEV}" -gt "${SUN_MIN_ELEV}" ]; then