Add WEBROOT_USER for chown, pass to remote-install
This commit is contained in:
@@ -2,14 +2,12 @@
|
||||
set -e
|
||||
|
||||
: "${WEBROOT:?WEBROOT is not set}"
|
||||
: "${WEBROOT_USER:?WEBROOT_USER is not set}"
|
||||
: "${USER_REPO:?USER_REPO is not set}"
|
||||
: "${GITEA_HOST:?GITEA_HOST is not set}"
|
||||
: "${GITEA_USER:?GITEA_USER is not set}"
|
||||
: "${GITEA_TOKEN:?GITEA_TOKEN is not set}"
|
||||
|
||||
echo "==> Installing PHP extensions"
|
||||
apt-get install -y php-curl php-gd php-mbstring php-xml php-zip php-yaml php-intl
|
||||
|
||||
echo "==> Downloading Grav"
|
||||
cd "$WEBROOT"
|
||||
wget -q https://getgrav.org/download/core/grav-admin/latest -O grav-admin.zip
|
||||
@@ -25,6 +23,7 @@ git clone "$USER_REPO" user
|
||||
rm ~/.netrc
|
||||
|
||||
echo "==> Setting permissions"
|
||||
chown -R "$WEBROOT_USER":"$WEBROOT_USER" "$WEBROOT"
|
||||
find "$WEBROOT" -type f -exec chmod 664 {} \;
|
||||
find "$WEBROOT" -type d -exec chmod 775 {} \;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user