From 8b374222eafe65dfcda1ef347684050d623e119c Mon Sep 17 00:00:00 2001 From: lbussy Date: Sun, 13 Dec 2020 13:48:41 -0600 Subject: [PATCH 1/3] FiX permissions on log --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 19bd04e..909c253 100755 --- a/install.sh +++ b/install.sh @@ -95,6 +95,8 @@ log() { thisscript="$(basename "$(realpath "$0")")" scriptname="${thisscript%%.*}" # Tee all output to log file in home directory + if [ -n "$SUDO_USER" ]; then realuser="$SUDO_USER"; else realuser=$(whoami); fi + chown "$realuser":"$realuser" "$HOMEPATH/$scriptname.log" sudo -u "$realuser" touch "$HOMEPATH/$scriptname.log" exec > >(tee >(timestamp >> "$HOMEPATH/$scriptname.log")) 2>&1 } @@ -861,6 +863,7 @@ main() { [[ "$*" == *"-verbose"* ]] && VERBOSE=true # Do not trim logs log "$@" # Create installation log arguments "$@" # Handle command line arguments + exit 0 echo -e "\n***Script $THISSCRIPT starting.***" term # Provide term codes findbrewpi # See if BrewPi is already installed From 5492018284e55c6f2bd887fa7e39830baa40f857 Mon Sep 17 00:00:00 2001 From: lbussy Date: Tue, 15 Dec 2020 16:32:39 -0600 Subject: [PATCH 2/3] Pre-position script --- change-branch.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 change-branch.sh diff --git a/change-branch.sh b/change-branch.sh new file mode 100755 index 0000000..604ff5b --- /dev/null +++ b/change-branch.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +cat << EOF + +This is currently under investigation. In the meantime the +following will get you to a different branch: + +sudo /home/brewpi/utils/doUpdate.sh +sudo systemctl stop brewpi +cd /var/www/html +sudo git checkout devel +sudo git pull +cd /home/brewpi +sudo git checkout devel +sudo git pull +cd /home/pi/brewpi-tools-rmx +sudo git checkout devel +sudo git pull +cd ~ +sudo /home/brewpi/utils/doPerms.sh +sudo systemctl start brewpi + +EOF From 3681ff45feedc8a05fc436f8260e780b0f8e739d Mon Sep 17 00:00:00 2001 From: lbussy Date: Mon, 21 Dec 2020 06:44:23 -0600 Subject: [PATCH 3/3] Do not need version --- bootstrap.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 51b4b5a..bc75009 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -34,7 +34,7 @@ ############ # General constants -declare THISSCRIPT VERSION GITBRNCH GITURL GITPROJ PACKAGE CHAMBER VERBOSE +declare THISSCRIPT GITBRNCH GITURL GITPROJ PACKAGE CHAMBER VERBOSE declare REPLY SOURCE SCRIPTSOURCE SCRIPTPATH CHAMBERNAME CMDLINE GITRAW GITHUB declare SCRIPTNAME GITCMD GITTEST APTPACKAGES VERBOSE LINK # Color/character codes @@ -42,7 +42,6 @@ declare BOLD SMSO RMSO FGBLK FGRED FGGRN FGYLW FGBLU FGMAG FGCYN FGWHT FGRST declare BGBLK BGRED BGGRN BGYLW BGBLU BGMAG BGCYN BGWHT BGRST DOT HHR LHR RESET # Version/Branch Constants GITBRNCH="master" -VERSION="0.5.4.4" THISSCRIPT="bootstrap.sh" LINK="install.brewpiremix.com" # Don't change for dev @@ -147,7 +146,7 @@ log() { usage() { cat << EOF -$PACKAGE $THISSCRIPT version $VERSION +$PACKAGE $THISSCRIPT Usage: sudo ./$THISSCRIPT" EOF @@ -157,7 +156,7 @@ EOF version() { cat << EOF -$THISSCRIPT ($PACKAGE) $VERSION +$THISSCRIPT ($PACKAGE) Copyright (C) 2018, 2019 Lee C. Bussy (@LBussy)