Update swp-install

pull/140/head v0.8.1
Mason10198 1 year ago
parent d1888c8a21
commit fc8f0f9c49

@ -27,7 +27,6 @@ print_notice() {
echo "This script is designed to automate the installation of SkywarnPlus." echo "This script is designed to automate the installation of SkywarnPlus."
echo "Author: Mason Nelson" echo "Author: Mason Nelson"
echo echo
echo
echo "NOTE: This script is an installer only and will NOT automate configuration." echo "NOTE: This script is an installer only and will NOT automate configuration."
echo "Please edit the config.yaml file manually after installation." echo "Please edit the config.yaml file manually after installation."
print_divider print_divider
@ -90,15 +89,9 @@ confirm_system_type() {
read -r -p "Enter the system type number: " SYSTEM_TYPE_INPUT read -r -p "Enter the system type number: " SYSTEM_TYPE_INPUT
SYSTEM_TYPE_INPUT=${SYSTEM_TYPE_INPUT:-3} SYSTEM_TYPE_INPUT=${SYSTEM_TYPE_INPUT:-3}
case $SYSTEM_TYPE_INPUT in case $SYSTEM_TYPE_INPUT in
1) 1) SYSTEM_TYPE="ASL1/2" ;;
SYSTEM_TYPE="ASL1/2" 3) SYSTEM_TYPE="ASL3" ;;
;; 5) SYSTEM_TYPE="HamVoIP" ;;
3)
SYSTEM_TYPE="ASL3"
;;
5)
SYSTEM_TYPE="HamVoIP"
;;
*) *)
print_divider print_divider
echo "Invalid input. Exiting." echo "Invalid input. Exiting."
@ -191,17 +184,17 @@ configure_perms() {
remove_old_cron() { remove_old_cron() {
print_divider print_divider
echo "Checking for "old style" crontab entry for SkywarnPlus.py..." echo "Checking for \"old style\" crontab entry for SkywarnPlus.py..."
CRONTAB_OLD=$(crontab -l | grep 'SkywarnPlus.py') CRONTAB_OLD=$(crontab -l | grep 'SkywarnPlus.py')
if [ -n "$CRONTAB_OLD" ]; then if [ -n "$CRONTAB_OLD" ]; then
echo "Found "old style" crontab entry for SkywarnPlus.py:" echo "Found \"old style\" crontab entry for SkywarnPlus.py:"
echo "$CRONTAB_OLD" echo "$CRONTAB_OLD"
echo "This must be removed to avoid conflicts. A new crontab entry will reside in /etc/cron.d/SkywarnPlus." echo "This must be removed to avoid conflicts. A new crontab entry will reside in /etc/cron.d/SkywarnPlus."
echo "Removing "old style" crontab entry for SkywarnPlus.py..." echo "Removing \"old style\" crontab entry for SkywarnPlus.py..."
(crontab -l | grep -v 'SkywarnPlus.py') | crontab - (crontab -l | grep -v 'SkywarnPlus.py') | crontab -
echo ""Old style" crontab entry for SkywarnPlus.py removed." echo "\"Old style\" crontab entry for SkywarnPlus.py removed."
else else
echo "No "old style" crontab entry found for SkywarnPlus.py." echo "No \"old style\" crontab entry found for SkywarnPlus.py."
fi fi
print_divider print_divider
@ -289,7 +282,7 @@ setup_crontab() {
read -r -p "Would you like to create the crontab entry for ASL3_Supermon_Workaround.py now? (Y/n): " CREATE_SUPERMON_CRON read -r -p "Would you like to create the crontab entry for ASL3_Supermon_Workaround.py now? (Y/n): " CREATE_SUPERMON_CRON
CREATE_SUPERMON_CRON=${CREATE_SUPERMON_CRON:-y} CREATE_SUPERMON_CRON=${CREATE_SUPERMON_CRON:-y}
if [ "$CREATE_SUPERMON_CRON" = "y" ] || [ "$CREATE_SUPERMON_CRON" = "Y" ]; then if [[ "$CREATE_SUPERMON_CRON" =~ ^[Yy]$ ]]; then
SUPERMON_CRON_FILE="/etc/cron.d/ASL3_Supermon_Workaround" SUPERMON_CRON_FILE="/etc/cron.d/ASL3_Supermon_Workaround"
SUPERMON_CRONTAB_ENTRY="*/$CRONTAB_INTERVAL * * * * root /usr/local/bin/SkywarnPlus/ASL3_Supermon_Workaround.py" SUPERMON_CRONTAB_ENTRY="*/$CRONTAB_INTERVAL * * * * root /usr/local/bin/SkywarnPlus/ASL3_Supermon_Workaround.py"

Loading…
Cancel
Save

Powered by TurnKey Linux.