Skip to content

Commit

Permalink
Issue BrewPi#42
Browse files Browse the repository at this point in the history
Check for custom wwwPath and use that instead of default, if it exists
  • Loading branch information
vanosg committed Mar 23, 2015
1 parent 13022f6 commit a6ec58f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion utils/fixPermissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ die () {
unset CDPATH
myPath="$( cd "$( dirname "${BASH_SOURCE[0]}")" && pwd )"
scriptPath="$(dirname "$myPath")"
webPath="/var/www"
if [ $1 ]; then
webPath=$1
else
webPath="/var/www"
fi

echo -e "\n***** Fixing file permissions for $webPath *****"
sudo chown -R www-data:www-data "$webPath"||warn
Expand Down
2 changes: 1 addition & 1 deletion utils/runAfterUpdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ myPath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

sudo bash "$myPath"/installDependencies.sh
sudo bash "$myPath"/updateCron.sh
sudo bash "$myPath"/fixPermissions.sh
sudo bash "$myPath"/fixPermissions.sh $1

0 comments on commit a6ec58f

Please sign in to comment.