1
0
mirror of https://github.com/moparisthebest/pi-hole synced 2024-11-25 02:32:15 -05:00

fix permission denied for log file

Just use a temporary file and then move it over once the install is
complete.
This commit is contained in:
Jacob Salmela 2015-10-31 09:19:57 -05:00 committed by dschaper
parent 37f255d761
commit a44591ca6b

View File

@ -10,6 +10,7 @@
# curl -L install.pi-hole.net | bash # curl -L install.pi-hole.net | bash
######## VARIABLES ######### ######## VARIABLES #########
tmpLog=/tmp/pihole-install.log
instalLogLoc=/etc/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 # 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) # Execute the command in the background (hidden from the user, not actually a background process)
${commands[${echoes[$k]}]} > $instalLogLoc 2>&1 ${commands[${echoes[$k]}]} > $instalLogLoc 2>&1
done done
sudo mv $tmpLog $instalLogLoc$instalLogLoc
# As the loop is progressing, the output is sent to whiptail to be displayed to the user # As the loop is progressing, the output is sent to whiptail to be displayed to the user
) | ) |