From 14e526714e90a82ead02429104b0edb0e8866d2e Mon Sep 17 00:00:00 2001 From: Kyle Gabriel Date: Thu, 19 Dec 2024 14:23:51 -0500 Subject: [PATCH] Fail if disagree with license agreement --- install/setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install/setup.sh b/install/setup.sh index 6d7e1a438..a1a2da34b 100755 --- a/install/setup.sh +++ b/install/setup.sh @@ -64,6 +64,11 @@ LICENSE=$(dialog --title "Mycodo Installer: License Agreement" \ --yesno "Mycodo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nMycodo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with Mycodo. If not, see gnu.org/licenses\n\nDo you agree to the license terms?" \ 20 68 \ 3>&1 1>&2 2>&3) +exitstatus=$? +if [ $exitstatus != 0 ]; then + printf "Mycodo install cancelled by user\n" 2>&1 | tee -a "${LOG_LOCATION}" + exit 1 +fi clear LANGUAGE=$(dialog --title "Mycodo Installer" \