diff --git a/scripts/clear_all_data.sh b/scripts/clear_all_data.sh index 2acb51b..17fbeda 100755 --- a/scripts/clear_all_data.sh +++ b/scripts/clear_all_data.sh @@ -14,11 +14,11 @@ sudo rm -drf "${RECS_DIR}" sudo rm -f "${IDFILE}" sudo rm -f $(dirname ${my_dir})/BirdDB.txt echo "Recreating necessary directories" -echo "Creating necessary directories" [ -d ${EXTRACTED} ] || sudo -u ${USER} mkdir -p ${EXTRACTED} [ -d ${EXTRACTED}/By_Date ] || sudo -u ${USER} mkdir -p ${EXTRACTED}/By_Date [ -d ${EXTRACTED}/By_Common_Name ] || sudo -u ${USER} mkdir -p ${EXTRACTED}/By_Common_Name [ -d ${EXTRACTED}/By_Scientific_Name ] || sudo -u ${USER} mkdir -p ${EXTRACTED}/By_Scientific_Name +[ -d ${EXTRACTED}/Charts] || sudo -u ${USER} mkdir -p ${EXTRACTED}/Charts [ -d ${PROCESSED} ] || sudo -u ${USER} mkdir -p ${PROCESSED} sudo -u ${USER} ln -fs $(dirname ${my_dir})/homepage/* ${EXTRACTED} @@ -58,6 +58,8 @@ sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/phpsysinfo.ini ${HOME}/phps sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/green_bootstrap.css ${HOME}/phpsysinfo/templates/ sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/index_bootstrap.html ${HOME}/phpsysinfo/templates/html +echo "Setting Wttr.in URL to "${LATITUDE}", "${LONGITUDE}"" +sudo -u${USER} sed -i "s/https:\/\/v2.wttr.in\//https:\/\/v2.wttr.in\/"${LATITUDE},${LONGITUDE}"/g" $(dirname ${my_dir})/homepage/menu.html generate_BirdDB() { echo "Generating BirdDB.txt"