From 7ebf617a49d5f060aa61aa8cbc2c0a6c7a6e374f Mon Sep 17 00:00:00 2001 From: Justin Hartman Date: Thu, 22 Jul 2021 02:05:33 +0200 Subject: [PATCH] Remove root check in tests, include test suite script --- tests/brew | 18 +++++++++--------- tests/lamp-add | 32 ++++++++++++++++---------------- tests/lamp-upgrade | 24 ++++++++++++------------ 3 files changed, 37 insertions(+), 37 deletions(-) mode change 100644 => 100755 tests/lamp-upgrade diff --git a/tests/brew b/tests/brew index e5b1d61..4b12f0b 100755 --- a/tests/brew +++ b/tests/brew @@ -1,16 +1,16 @@ #!/bin/bash # -# Fully automated LAMP installation and configuration using Trusted localhost +# Fully automated LAMP installation and configuration using Trusted localhost # SSL Certificates -# -# Copyright: Copyright (C) 2018 Justin Hartman (https://justin.hartman.me) -# Author : Justin Hartman (https://justin.hartman.me) +# +# Copyright: Copyright (C) 2018 Justin Hartman (https://justinhartman.co) +# Author : Justin Hartman (https://justinhartman.co) # License : https://opensource.org/licenses/AGPL-3.0 AGPL-3.0 # Version : 1.1.0 -# Link : https://github.com/22digital/Automated-LAMP-trusted-localhost-SSL -# Link : https://justin.hartman.me +# Link : https://github.com/justinhartman/lamp-ssl +# Link : https://justinhartman.co # Since : 0.5.0 -# +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -23,7 +23,7 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -# +# ####################################### # Includes the colour palette and @@ -37,7 +37,7 @@ ####################################### global_includes () { - source scripts/globals.sh + source ./test_suite.sh source scripts/colour_palette.sh } diff --git a/tests/lamp-add b/tests/lamp-add index b47cf63..21253d5 100755 --- a/tests/lamp-add +++ b/tests/lamp-add @@ -3,15 +3,15 @@ # Add new domains to your setup. This creates the website folder, link to the # /etc/hosts file, creates a SSL certificate and sets up a git project for you # to begin using. -# -# Copyright: Copyright (C) 2018 Justin Hartman (https://justin.hartman.me) -# Author : Justin Hartman (https://justin.hartman.me) +# +# Copyright: Copyright (C) 2018 Justin Hartman (https://justinhartman.co) +# Author : Justin Hartman (https://justinhartman.co) # License : https://opensource.org/licenses/AGPL-3.0 AGPL-3.0 # Version : 1.1.0 -# Link : https://github.com/22digital/Automated-LAMP-trusted-localhost-SSL -# Link : https://justin.hartman.me +# Link : https://github.com/justinhartman/lamp-ssl +# Link : https://justinhartman.co # Since : 0.5.0 -# +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the @@ -24,7 +24,7 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -# +# ####################################### # Includes the colour palette and @@ -38,7 +38,7 @@ ####################################### global_includes () { - source scripts/globals.sh + source ./test_suite.sh source scripts/colour_palette.sh } @@ -75,14 +75,14 @@ main_application () global_includes # Includes global variables and file paths. -if ! [ "$(id -u)" = 0 ]; then - printf "${RED}%s\\n" "$TOP" - printf "* %-76s %s\\n" "This needs to be run as root. Please run it again using 'sudo' by executing" "*" - printf "* %-76s %s\\n" "the following command: $ sudo ./add_domain" "*" - printf "%s${NOC}\\n\\n" "$BOTTOM" - - exit 1 -fi +#if ! [ "$(id -u)" = 0 ]; then +# printf "${RED}%s\\n" "$TOP" +# printf "* %-76s %s\\n" "This needs to be run as root. Please run it again using 'sudo' by executing" "*" +# printf "* %-76s %s\\n" "the following command: $ sudo ./add_domain" "*" +# printf "%s${NOC}\\n\\n" "$BOTTOM" +# +# exit 1 +#fi main_application # Runs the main install exit 0 diff --git a/tests/lamp-upgrade b/tests/lamp-upgrade old mode 100644 new mode 100755 index daa94fa..e91eb70 --- a/tests/lamp-upgrade +++ b/tests/lamp-upgrade @@ -2,11 +2,11 @@ # # Upgrade all the software. # -# Copyright: Copyright 2018-2020 Justin Hartman (https://hartman.me) -# Author : Justin Hartman (https://hartman.me) +# Copyright: Copyright 2018-2020 Justin Hartman (https://justinhartman.co) +# Author : Justin Hartman (https://justinhartman.co) # License : https://opensource.org/licenses/AGPL-3.0 AGPL-3.0 # Version : 1.2.2 -# Link : https://github.com/22digital/Automated-LAMP-trusted-localhost-SSL +# Link : https://github.com/justinhartman/lamp-ssl # Since : 1.1.0 # # This program is free software: you can redistribute it and/or modify @@ -34,7 +34,7 @@ # Variables ####################################### global_includes() { - source ./scripts/globals.sh + source ./test_suite.sh source ./scripts/colour_palette.sh } @@ -58,14 +58,14 @@ main_application() { global_includes # Includes global variables and file paths. -if ! [ "$(id -u)" = 0 ]; then - printf "${RED}%s\\n" "$TOP" - printf '* %-76s %s\n' "This needs to be run as root. Please run it again using 'sudo' by executing" "*" - printf '* %-76s %s\n' "the following command: $ sudo ./upgrade" "*" - printf "%s${NOC}\\n\\n" "$BOTTOM" - - exit 1 -fi +#if ! [ "$(id -u)" = 0 ]; then +# printf "${RED}%s\\n" "$TOP" +# printf '* %-76s %s\n' "This needs to be run as root. Please run it again using 'sudo' by executing" "*" +# printf '* %-76s %s\n' "the following command: $ sudo ./upgrade" "*" +# printf "%s${NOC}\\n\\n" "$BOTTOM" +# +# exit 1 +#fi ####################################### # Runs the main upgrade.