From 17dc294d4d3a7b54539432a9f0e1f9b054078aee Mon Sep 17 00:00:00 2001 From: tb14 Date: Mon, 7 Nov 2022 00:07:36 -0600 Subject: [PATCH] Vara working on mint; shell for testing on pi Setup Script sudo keepalive for Mint installs --- AmRRON-Setup-Script.sh | 29 ++++++++++++++++++++++++++-- AmRRON-Vara-setup.sh | 4 ++-- changelogs/CHANGELOG-Setup-Script.md | 3 +++ changelogs/CHANGELOG-Vara-setup.md | 2 +- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index aa2d238..e59b38d 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -1,9 +1,9 @@ #!/bin/bash ################################################################################ ################################################################################ -######################## AmRRON Setup Script v0.7.4.3 ######################## +######################## AmRRON Setup Script v0.7.4.4 ######################## ######################## Created by TB-14 ######################## -######################## 05 NOV 22 ######################## +######################## 06 NOV 22 ######################## ################################################################################ ################################################################################ # @@ -49,6 +49,31 @@ ################################################################################ ################################################################################ ################################################################################ +# Ask for the administrator password upfront +clear;echo +echo "###########################################" +echo "###########################################" +echo "╔═╗╔╦╗╦═╗╦═╗╔═╗╔╗╔ ╔═╗╔═╗╦═╗╔═╗╔═╗"; +echo "╠═╣║║║╠╦╝╠╦╝║ ║║║║ ║ ║ ║╠╦╝╠═╝╚═╗"; +echo "╩ ╩╩ ╩╩╚═╩╚═╚═╝╝╚╝ ╚═╝╚═╝╩╚═╩ ╚═╝"; +echo "###########################################" +echo "###########################################" + +if $(sudo -n true); then + return; +else +echo "You will be prompted for your sudo password" +echo "below in order to install vara dependencies." +echo "###########################################" +echo "###########################################" +sudo -v + +# Keep-alive: update existing `sudo` time stamp until script has finished +while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & +fi + + + # Find out if we have yad and install if not echo "Yad is used to create the interactive menus this program uses." echo "If yad is not installed, we will attempt to install it now." diff --git a/AmRRON-Vara-setup.sh b/AmRRON-Vara-setup.sh index d58e1fc..6a38e62 100755 --- a/AmRRON-Vara-setup.sh +++ b/AmRRON-Vara-setup.sh @@ -170,12 +170,12 @@ fi function confirm_os() { -if [[ $OSCN =~ buster|bullseye|una|vanessa ]]; then +if [[ $OSCN =~ una|vanessa ]]; then echo "Continuing with install" else yad --image=$DIR/images/corps-icon.png --center \ --title "Not Supported OS" \ - --text "::: Exiting due to unsupported OS. This script has only been tested on Mint 21 at this time." ${r} ${c} + --text "::: Exiting due to unsupported OS. This script has only been tested on Mint 20.3 and 21 at this time." ${r} ${c} exit 1 fi } diff --git a/changelogs/CHANGELOG-Setup-Script.md b/changelogs/CHANGELOG-Setup-Script.md index 52d5a54..c4f9bcf 100644 --- a/changelogs/CHANGELOG-Setup-Script.md +++ b/changelogs/CHANGELOG-Setup-Script.md @@ -1,3 +1,6 @@ +# Version 0.7.4.4 +- Added sudo keepalive loop for mint installs + # Version 0.7.4.3 - Testing g++ dependency for hamlib - Removed auto removal of source directories. diff --git a/changelogs/CHANGELOG-Vara-setup.md b/changelogs/CHANGELOG-Vara-setup.md index 73ed2eb..364727b 100644 --- a/changelogs/CHANGELOG-Vara-setup.md +++ b/changelogs/CHANGELOG-Vara-setup.md @@ -1,6 +1,6 @@ # Version 0.2 - testing sudo keepalive and Mint 20.3 support -- basic shell for pi setup +- basic shell for pi setup - Not working on Buster, testing Bullseye soon. # Version 0.1 - initial testing for Vara install on Mint 21. \ No newline at end of file