diff --git a/scripts/caddyinstall.sh b/scripts/caddyinstall.sh index 825614f..7f0d5b8 100644 --- a/scripts/caddyinstall.sh +++ b/scripts/caddyinstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install Caddy Server? [Y/n] " input @@ -16,25 +16,7 @@ do ;; esac done -set -b -ping -c1 "github.com" &>"/dev/null" -ping -c1 "api.github.com" &>"/dev/null" -ping -c1 "raw.githubusercontent.com" &>"/dev/null" -if [[ "${?}" -ne 0 ]]; then - echo "I am unable to access one of the necessary domains that are needed to continue this Install." -elif [[ "${#args[@]}" -eq 0 ]]; then -# Check if curl is installed -if [ ! -x /usr/bin/curl ] ; then -CURL_NOT_EXIST=1 -apt install -y curl -else -CURL_NOT_EXIST=0 -fi -set -b -ping -c1 "go.dev" &>"/dev/null" -if [[ "${?}" -ne 0 ]]; then - echo "I am unable to access one of the necessary domains that are needed to continue this Install." -elif [[ "${#args[@]}" -eq 0 ]]; then + # Check if curl is installed if [ ! -x /usr/bin/curl ] ; then CURL_NOT_EXIST=1 diff --git a/scripts/fail2baninstall.sh b/scripts/fail2baninstall.sh index 5316bb9..19afd83 100644 --- a/scripts/fail2baninstall.sh +++ b/scripts/fail2baninstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install fail2ban? [Y/n] " input diff --git a/scripts/giteainstall.sh b/scripts/giteainstall.sh index 3b21966..483dc5b 100644 --- a/scripts/giteainstall.sh +++ b/scripts/giteainstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install Gitea? [Y/n] " input diff --git a/scripts/gitearemove.sh b/scripts/gitearemove.sh index 49d2732..20c99f5 100644 --- a/scripts/gitearemove.sh +++ b/scripts/gitearemove.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to uninstall Gitea? This is not reversible. [Y/n] " input diff --git a/scripts/giteaupdate.sh b/scripts/giteaupdate.sh index 6f03a00..9bc99ee 100644 --- a/scripts/giteaupdate.sh +++ b/scripts/giteaupdate.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to update Gitea? [Y/n] " input diff --git a/scripts/goinstall.sh b/scripts/goinstall.sh index 3bf56fe..7aa2540 100644 --- a/scripts/goinstall.sh +++ b/scripts/goinstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install Go Language? [Y/n] " input @@ -16,11 +16,7 @@ do ;; esac done -set -b -ping -c1 "go.dev" &>"/dev/null" -if [[ "${?}" -ne 0 ]]; then - echo "I am unable to access one of the necessary domains that are needed to continue this Install." -elif [[ "${#args[@]}" -eq 0 ]]; then + # Check if curl is installed if [ ! -x /usr/bin/curl ] ; then CURL_NOT_EXIST=1 diff --git a/scripts/hockeypuckinstall.sh b/scripts/hockeypuckinstall.sh index 48353ee..8e24011 100644 --- a/scripts/hockeypuckinstall.sh +++ b/scripts/hockeypuckinstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install Hockeypuck? [Y/n] " input @@ -23,11 +23,6 @@ else CURL_NOT_EXIST=0 fi sudo apt-get install bzr git mercurial -y -set -b -ping -c1 "go.dev" &>"/dev/null" -if [[ "${?}" -ne 0 ]]; then - echo "I am unable to access one of the necessary domains that are needed to continue this Install." -elif [[ "${#args[@]}" -eq 0 ]]; then # Check if curl is installed if [ ! -x /usr/bin/curl ] ; then CURL_NOT_EXIST=1 diff --git a/scripts/hugoinstall.sh b/scripts/hugoinstall.sh index 542e833..65f27a3 100644 --- a/scripts/hugoinstall.sh +++ b/scripts/hugoinstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install Hugo? [Y/n] " input @@ -16,26 +16,6 @@ do ;; esac done -set -b -ping -c1 "github.com" &>"/dev/null" -ping -c1 "api.github.com" &>"/dev/null" -ping -c1 "raw.githubusercontent.com" &>"/dev/null" -if [[ "${?}" -ne 0 ]]; then - echo "I am unable to access one of the necessary domains that are needed to continue this Install." -elif [[ "${#args[@]}" -eq 0 ]]; then -# Check if curl is installed -if [ ! -x /usr/bin/curl ] ; then -CURL_NOT_EXIST=1 -apt install -y curl -else -CURL_NOT_EXIST=0 -fi -set -b -ping -c1 "go.dev" &>"/dev/null" -if [[ "${?}" -ne 0 ]]; then - echo "I am unable to access one of the necessary domains that are needed to continue this Install." -elif [[ "${#args[@]}" -eq 0 ]]; then -# Check if curl is installed if [ ! -x /usr/bin/curl ] ; then CURL_NOT_EXIST=1 apt install -y curl @@ -43,6 +23,7 @@ else CURL_NOT_EXIST=0 fi apt remove golang -y +apt autoremove -y rm -rf /tmp/go/ mkdir /tmp/go/ cd /tmp/go/ @@ -77,5 +58,4 @@ fi cd /tmp/hugo/ tar -xzf /tmp/hugo/*.tar.gz sudo mv /tmp/hugo/hugo /usr/local/bin -cd ~ -fi \ No newline at end of file +cd ~ \ No newline at end of file diff --git a/scripts/librenmsinstall.sh b/scripts/librenmsinstall.sh index 4e595b1..e2144ed 100644 --- a/scripts/librenmsinstall.sh +++ b/scripts/librenmsinstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install Librenms? [Y/n] " input diff --git a/scripts/mariadbinstall.sh b/scripts/mariadbinstall.sh index 6adf30a..eeb1d99 100644 --- a/scripts/mariadbinstall.sh +++ b/scripts/mariadbinstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install MariaDB? [Y/n] " input @@ -16,7 +16,6 @@ do ;; esac done - apt update && apt upgrade -y sudo apt install wget software-properties-common dirmngr ca-certificates apt-transport-https mariadb-server mariadb-client -y echo -e "==================================================================" diff --git a/scripts/mastodoninstall.sh b/scripts/mastodoninstall.sh index 74168f7..8b0988f 100644 --- a/scripts/mastodoninstall.sh +++ b/scripts/mastodoninstall.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +trap 'exit 130' INT while true do read -r -p "Would you like to install Mastodon? [Y/n] " input diff --git a/scripts/misskeyinstall.sh b/scripts/misskeyinstall.sh index 2cc30df..97d62d9 100644 --- a/scripts/misskeyinstall.sh +++ b/scripts/misskeyinstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install Misskey? [Y/n] " input diff --git a/scripts/mongodbinstall.sh b/scripts/mongodbinstall.sh index 7d5c707..3254f02 100644 --- a/scripts/mongodbinstall.sh +++ b/scripts/mongodbinstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install MongoDB? [Y/n] " input diff --git a/scripts/pmainstall.sh b/scripts/pmainstall.sh index a987b3b..9666d51 100644 --- a/scripts/pmainstall.sh +++ b/scripts/pmainstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to install phpMyAdmin? [Y/n] " input diff --git a/scripts/pmauninstall.sh b/scripts/pmauninstall.sh index da3ab0b..d464573 100644 --- a/scripts/pmauninstall.sh +++ b/scripts/pmauninstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to uninstall phpMyAdmin? [Y/n] " input diff --git a/scripts/pmaupdate.sh b/scripts/pmaupdate.sh index c4eaae7..d55d064 100644 --- a/scripts/pmaupdate.sh +++ b/scripts/pmaupdate.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +trap 'exit 130' INT while true do read -r -p "Would you like to Update phpMyAdmin? [Y/n] " input diff --git a/scripts/wpinstall.sh b/scripts/wpinstall.sh index e8cf2fe..63a849b 100644 --- a/scripts/wpinstall.sh +++ b/scripts/wpinstall.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +trap 'exit 130' INT while true do read -r -p "Would you like to install Wordpress? [Y/n] " input