Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 10, 2020. It is now read-only.

Commit 340ace6

Browse files
committed
Correct permissions with webroot
Signed-off-by: Mriyam Tamuli <mbtamuli@gmail.com>
1 parent 695a151 commit 340ace6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎scripts/ee4‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ help () {
4949
singleWordPress() {
5050
echo "Installing WordPress site $SITE_NAME"
5151
if ! [[ -d "$WEBROOT" ]]; then
52-
runAsRoot mkdir -p "$WEBROOT" > /dev/null 2>&1
52+
mkdir -p "$WEBROOT" > /dev/null 2>&1
53+
if [ "$?" -eq 1 ]; then
54+
runAsRoot mkdir -p "$WEBROOT" > /dev/null 2>&1
55+
runAsRoot chown -R "$USER": "$WEBROOT"
56+
fi
5357
fi
5458

5559
###
@@ -171,8 +175,7 @@ useDbShell() {
171175

172176
removeHost() {
173177
HOSTNAME=1ドル
174-
if [ -n "$(grep $HOSTNAME /etc/hosts)" ]
175-
then
178+
if [ -n "$(grep $HOSTNAME /etc/hosts)" ]; then
176179
echo "$HOSTNAME Found in your $ETC_HOSTS, Removing now...";
177180
sudo sed -i".bak" "/$HOSTNAME/d" $ETC_HOSTS
178181
else

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /