From e2df64931173da39b293f1c62ad226f8b9ea0f67 Mon Sep 17 00:00:00 2001 From: hjelev Date: Sat, 19 Mar 2022 01:15:07 +0200 Subject: [PATCH] update --- install.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 0df1d7f..ada7daf 100755 --- a/install.sh +++ b/install.sh @@ -8,17 +8,15 @@ printm(){ } print_green(){ - tput setaf 2; echo "$1" - tput sgr 0 + tput setaf 2; echo "$1" + tput sgr 0 } print_yellow(){ - tput setaf 3; printf "$1" - tput sgr 0 + tput setaf 3; printf "$1" + 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