Commit 097a65b2 authored by anarcat's avatar anarcat

debian: move all of the webserver logic back into hostmaster

provision is just a drush extension, no need to configure the
webserver directly here. if users want to use provision by hand, they
should be able to create that symlink themselves.

the trade off between duplicating the checks and logic between the two
packages just wasn't worth it
parent 1a7daa7d
...@@ -124,6 +124,21 @@ EOF ...@@ -124,6 +124,21 @@ EOF
service hosting-queued start service hosting-queued start
fi fi
rm -f $TEMPFILE rm -f $TEMPFILE
# make sure we have apache configs settled in, for remote headless aegir servers
touch $VARLIB/config/$WEBSERVER.conf
chown aegir:aegir "$VARLIB/config/$WEBSERVER.conf"
ln -sf $VARLIB/config/$WEBSERVER.conf /etc/apache2/conf.d/aegir.conf
case $WEBSERVER in
apache)
a2enmod ssl rewrite
apache2ctl graceful
;;
nginx)
service nginx reload
;;
esac
# this will ensure that this script aborts if the site can't be bootstrapped # this will ensure that this script aborts if the site can't be bootstrapped
if su -s /bin/sh aegir -c 'drush @hostmaster status' 2>&1 | grep -q 'Drupal bootstrap.*Successful'; then if su -s /bin/sh aegir -c 'drush @hostmaster status' 2>&1 | grep -q 'Drupal bootstrap.*Successful'; then
echo 'Aegir frontend bootstrap correctly, operation was a success!' echo 'Aegir frontend bootstrap correctly, operation was a success!'
......
...@@ -38,3 +38,13 @@ Description: Makefile used to create the platform: ...@@ -38,3 +38,13 @@ Description: Makefile used to create the platform:
default. default.
. .
If this is left empty, Aegir will use its internal makefile. If this is left empty, Aegir will use its internal makefile.
Template:aegir/webserver
Type: select
Description: Webserver type to use:
Aegir supports two different webserver engines. You need to select
which one you wish to use to deploy the main frontend
interface. Regardless of the option chosen here, you can still deploy
other webserver types on remote servers.
Default: apache2
Choices: apache2, nginx
...@@ -28,14 +28,6 @@ VARLIB="/var/aegir" ...@@ -28,14 +28,6 @@ VARLIB="/var/aegir"
case "$1" in case "$1" in
configure) configure)
db_get "aegir/webserver"
if [ ! -z "$RET" ]; then
if [ "$RET" = 'apache2' ]; then
RET='apache' # convert argument to something aegir can understand
fi
WEBSERVER="$RET"
fi
# add a aegir user if one does not already exist # add a aegir user if one does not already exist
if ! getent passwd aegir >/dev/null ; then if ! getent passwd aegir >/dev/null ; then
echo "adding aegir user..." echo "adding aegir user..."
...@@ -55,22 +47,6 @@ case "$1" in ...@@ -55,22 +47,6 @@ case "$1" in
echo "running an older version of sudo" echo "running an older version of sudo"
echo "copy content of /usr/share/doc/aegir-provision2/examples/example.sudoers into /etc/sudoers for aegir to run properly" echo "copy content of /usr/share/doc/aegir-provision2/examples/example.sudoers into /etc/sudoers for aegir to run properly"
fi fi
# fix permissions on installed directories
chown aegir:aegir "$VARLIB" "$VARLIB/config"
# make sure we have apache configs settled in, for remote headless aegir servers
touch $VARLIB/config/$WEBSERVER.conf
chown aegir:aegir "$VARLIB/config/$WEBSERVER.conf"
ln -sf $VARLIB/config/$WEBSERVER.conf /etc/apache2/conf.d/aegir.conf
case $WEBSERVER in
apache)
a2enmod ssl rewrite
apache2ctl graceful
;;
nginx)
service nginx reload
;;
esac
;; ;;
abort-upgrade|abort-remove|abort-deconfigure) abort-upgrade|abort-remove|abort-deconfigure)
......
Template:aegir/webserver
Type: select
Description: Webserver type to use:
Aegir supports two different webserver engines. You need to select
which one you wish to use to deploy the main frontend
interface. Regardless of the option chosen here, you can still deploy
other webserver types on remote servers.
Default: apache2
Choices: apache2, nginx
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