summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerman van Rink2015-07-19 19:18:20 (GMT)
committerHerman van Rink2015-07-19 19:18:20 (GMT)
commit45d40cdaa3bc790983af478304eeb297007bb540 (patch)
treec71cb3b29f9485dde86cca9a74e55c662d7b96f5
parent0fecccecb89ae97f6a87290cdd3faec216d24986 (diff)
Fix debian upgrade code to match Drush 6
-rw-r--r--debian/aegir3-hostmaster.postinst10
1 files changed, 5 insertions, 5 deletions
diff --git a/debian/aegir3-hostmaster.postinst b/debian/aegir3-hostmaster.postinst
index 1ec8f45..57dd58d 100644
--- a/debian/aegir3-hostmaster.postinst
+++ b/debian/aegir3-hostmaster.postinst
@@ -57,12 +57,13 @@ case "$1" in
# flush the drush cache to find new commands
su -s /bin/sh aegir -c 'drush cc drush'
- TEMPFILE=`tempfile`
- su -s /bin/sh aegir -c 'drush --pipe @hostmaster status 2>/dev/null | egrep "site_uri|drupal_root"' >> $TEMPFILE || true
- if grep -q 'site_uri' $TEMPFILE; then
+
+ site_uri=`drush @hostmaster status --fields="uri" --field-labels=0 | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*\$//g'`
+ drupal_root=`drush @hostmaster status --fields="root" --field-labels=0 | sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*\$//g'`
+
+ if [ -n $drupal_root ]; then
# upgrade
db_stop
- . $TEMPFILE
echo "Aegir frontend (@hostmaster) site detected in $drupal_root"
# make those paths canonical to make sure we can compare correctly
NEW_PLATFORM=`readlink -f "$AEGIRHOME/hostmaster-$VERSION"`
@@ -130,7 +131,6 @@ EOF
su -s /bin/sh aegir -c 'drush @hostmaster pm-enable -y hosting_queued'
service hosting-queued start
fi
- rm -f $TEMPFILE
case $WEBSERVER in
apache)