Commit 7a212a91 authored by anarcat's avatar anarcat Committed by anarcat
Browse files

rewrite installer

 1. don't install drushrc
 2. don't install apache config (hostmaster-install does that)
 3. install directly in /var/aegir again, as aegir assumes that
parent b814740e
......@@ -17,7 +17,7 @@ set -e
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
VARLIB="/var/lib/aegir"
VARLIB="/var/aegir"
case "$1" in
configure)
......@@ -52,55 +52,13 @@ case "$1" in
rm -f $TEMPFILE
ucfr aegir-provision /etc/sudoers.d/aegir
# create apache configuration for aegir
if [ -x /usr/sbin/apache2ctl ] ; then
ln -sf /etc/aegir/apache.conf /etc/apache2/conf.d/aegir.conf
invoke-rc.d apache2 force-reload
elif [ -x /usr/sbin/apachectl ] ; then
ln -sf /etc/aegir/apache.conf /etc/apache/conf.d/aegir.conf
invoke-rc.d apache force-reload
fi
# fix permissions on installed directories
chown aegir:aegir "$VARLIB"
for dir in /etc/drush /etc/aegir /var/backups/aegir ; do
for dir in /var/aegir ; do
chown aegir:aegir $dir
chmod 0700 $dir
done
# old 0.3-2 cruft, we now write directly to /etc/drush
if [ -e /etc/aegir/drushrc.php ]; then
ucf /etc/aegir/drushrc.php /etc/drush/drushrc.php
ucf --purge /etc/aegir/drushrc.php
rm -f /etc/aegir/drushrc.php
fi
TEMPFILE=`tempfile`
# fix the apache restart command if we're running apache2
if [ -x /usr/sbin/apache2ctl ] ; then
command='/usr/sbin/apache2ctl'
else
command='/usr/sbin/apachectl'
fi
cat >> $TEMPFILE <<EOF
<?php
# this file is automatically regenerated by aegir-provision postinst scripts
# modify at your own risks
\$options['web_group'] = 'www-data';
\$options['script_user'] = 'aegir';
\$options['backup_path'] = '/var/backups/aegir';
\$options['config_path'] = '/etc/aegir';
\$options['restart_cmd'] = 'sudo $command graceful';
EOF
# note that aegir-provision is the owner of the drushrc.php
# configuration file, not drush.
ucf $TEMPFILE /etc/drush/drushrc.php
rm -f $TEMPFILE
ucfr aegir-provision /etc/drush/drushrc.php
chown aegir:aegir /etc/drush/drushrc.php
chown 640 /etc/drush/drushrc.php
;;
abort-upgrade|abort-remove|abort-deconfigure)
......
......@@ -29,7 +29,7 @@ case "$1" in
echo >&2 "not removing aegir system account because deluser command was not found"
fi
for conffile in /etc/sudoers.d/aegir /etc/drush/drushrc.php /etc/aegir/drushrc.php; do
for conffile in /etc/sudoers.d/aegir; do
ucf --purge $conffile
rm -f $conffile
done
......
Supports Markdown
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