Commit c1339025 authored by anarcat's avatar anarcat

debian: properly detect webserver, again (#2040285)

first, the symlink was just not created because a variable wasn't
passed properly.

second, permissions were fixed on the directories only on installs,
which is error-prone: we should fix them all the time.
parent d5a88625
......@@ -47,8 +47,14 @@ case "$1" in
RET='apache' # convert argument to something aegir can understand
fi
FLAGS="$FLAGS --http_service_type='$RET'"
WEBSERVER="$RET"
fi
# make sure the configuration file exists before symlinking it in place (below)
touch $VARLIB/config/$WEBSERVER.conf
# fix permissions on installed directories
chown aegir:aegir "$VARLIB" "$VARLIB/config" "$VARLIB/config/$WEBSERVER.conf"
# flush the drush cache to find new commands
su -s /bin/sh aegir -c 'drush cc drush'
TEMPFILE=`tempfile`
......@@ -109,10 +115,6 @@ case "$1" in
DEBUG="--debug"
fi
# fix permissions on installed directories
touch $VARLIB/config/$WEBSERVER.conf
chown aegir:aegir "$VARLIB" "$VARLIB/config" "$VARLIB/config/$WEBSERVER.conf"
# pass data through JSON for extra security
su -s /bin/sh aegir -c "cd $VARLIB && drush hostmaster-install $FLAGS --backend $site_uri 2>&1 | drush backend-parse $DEBUG" <<EOF
{ "yes": 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment