removed sudo from root script

This commit is contained in:
Patrick McGuire
2021-11-29 12:13:32 -05:00
parent 3dce3a3db1
commit 6860d197a3
3 changed files with 60 additions and 12 deletions
+50 -2
View File
@@ -102,7 +102,7 @@ run_analysis() {
done done
fi fi
if [ -f ${1}/${i} ] && [ ! -f ${CUSTOM_LIST} ];then if [ -f ${1}/${i} ] && [ ! -f ${CUSTOM_LIST} ] && [ -z $STATION_NUMBER ];then
echo "python3 analyze.py \ echo "python3 analyze.py \
--i "${1}/${i}" \ --i "${1}/${i}" \
--o "${1}/${i}.csv" \ --o "${1}/${i}.csv" \
@@ -121,7 +121,7 @@ run_analysis() {
--overlap "${OVERLAP}" \ --overlap "${OVERLAP}" \
--sensitivity "${SENSITIVITY}" \ --sensitivity "${SENSITIVITY}" \
--min_conf "${CONFIDENCE}" --min_conf "${CONFIDENCE}"
elif [ -f ${1}/${i} ] && [ -f ${CUSTOM_LIST} ];then elif [ -f ${1}/${i} ] && [ -f ${CUSTOM_LIST} ] && [ -z $STATION_NUMBER ];then
echo "python3 analyze.py \ echo "python3 analyze.py \
--i "${1}/${i}" \ --i "${1}/${i}" \
--o "${1}/${i}.csv" \ --o "${1}/${i}.csv" \
@@ -142,6 +142,54 @@ run_analysis() {
--sensitivity "${SENSITIVITY}" \ --sensitivity "${SENSITIVITY}" \
--min_conf "${CONFIDENCE}" \ --min_conf "${CONFIDENCE}" \
--custom_list "${CUSTOM_LIST}" --custom_list "${CUSTOM_LIST}"
elif [ -f ${1}/${i} ] && [ ! -f ${CUSTOM_LIST} ] && [ ! -z $STATION_NUMBER ];then
echo "python3 analyze.py \
--i "${1}/${i}" \
--o "${1}/${i}.csv" \
--lat "${LATITUDE}" \
--lon "${LONGITUDE}" \
--week "${WEEK}" \
--overlap "${OVERLAP}" \
--sensitivity "${SENSITIVITY}" \
--min_conf "${CONFIDENCE}" \
--s "${STATION_NUMBER}"\
--meta_data "${STATION_NAME}""
"${VENV}"/bin/python analyze.py \
--i "${1}/${i}" \
--o "${1}/${i}.csv" \
--lat "${LATITUDE}" \
--lon "${LONGITUDE}" \
--week "${WEEK}" \
--overlap "${OVERLAP}" \
--sensitivity "${SENSITIVITY}" \
--min_conf "${CONFIDENCE}" \
--s "${STATION_NUMBER}"\
--meta_data "${STATION_NAME}"
elif [ -f ${1}/${i} ] && [ -f ${CUSTOM_LIST} ] && [ ! -z $STATION_NUMBER ];then
echo "python3 analyze.py \
--i "${1}/${i}" \
--o "${1}/${i}.csv" \
--lat "${LATITUDE}" \
--lon "${LONGITUDE}" \
--week "${WEEK}" \
--overlap "${OVERLAP}" \
--sensitivity "${SENSITIVITY}" \
--min_conf "${CONFIDENCE}" \
--custom_list "${CUSTOM_LIST}"\
--s "${STATION_NUMBER}"\
--meta_data "${STATION_NAME}""
"${VENV}"/bin/python analyze.py \
--i "${1}/${i}" \
--o "${1}/${i}.csv" \
--lat "${LATITUDE}" \
--lon "${LONGITUDE}" \
--week "${WEEK}" \
--overlap "${OVERLAP}" \
--sensitivity "${SENSITIVITY}" \
--min_conf "${CONFIDENCE}" \
--custom_list "${CUSTOM_LIST}"\
--s "${STATION_NUMBER}"\
--meta_data "${STATION_NAME}"
fi fi
done done
} }
+1 -1
View File
@@ -317,7 +317,7 @@ ExecStart=/usr/local/bin/daily_plot.py
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
sudo systemctl enable chart_viewer.service systemctl enable chart_viewer.service
} }
install_gotty_logs() { install_gotty_logs() {
+1 -1
View File
@@ -315,7 +315,7 @@ ExecStart=/usr/local/bin/daily_plot.py
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
sudo systemctl enable chart_viewer.service systemctl enable chart_viewer.service
} }
install_gotty_logs() { install_gotty_logs() {