This commit is contained in:
hjelev
2022-03-19 01:15:07 +02:00
parent 9b665d3384
commit e2df649311

View File

@@ -17,8 +17,6 @@ print_yellow(){
tput sgr 0
}
printm "Raspberry Pi MQTT monitor installer"
check_and_install_pip(){
cwd=$(pwd)
python=$(which python)
@@ -80,7 +78,6 @@ set_cron(){
print_yellow " If you want the cronjob to be automatically created remove the line below from your\n cronjobs list and run the installer again.\n\n"
echo " ${cronfound}"
else
printf "How often do you want the script to run in minutes? "
read MIN
echo "Adding the line below to your crontab"
@@ -88,11 +85,11 @@ set_cron(){
echo "*/${MIN} * * * * ${python} ${cwd}/src/rpi-cpu2mqtt.py" >> tempcron
crontab tempcron
fi
rm tempcron
}
main(){
printm "Raspberry Pi MQTT monitor installer"
check_and_install_pip
install_requirements
update_config