removed sudo from root script
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user