From a44591ca6be363d40d6c4c13f38021765ce2ce30 Mon Sep 17 00:00:00 2001 From: Jacob Salmela Date: Sat, 31 Oct 2015 09:19:57 -0500 Subject: [PATCH] fix permission denied for log file Just use a temporary file and then move it over once the install is complete. --- automated install/basic-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 98935a87..9e36448d 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -10,6 +10,7 @@ # curl -L install.pi-hole.net | bash ######## VARIABLES ######### +tmpLog=/tmp/pihole-install.log instalLogLoc=/etc/pihole/install.log # Get the screen size in case we need a full-screen message and so we can display a dialog that is sized nicely @@ -206,6 +207,7 @@ EOF # Execute the command in the background (hidden from the user, not actually a background process) ${commands[${echoes[$k]}]} > $instalLogLoc 2>&1 done +sudo mv $tmpLog $instalLogLoc$instalLogLoc # As the loop is progressing, the output is sent to whiptail to be displayed to the user ) |