reset.txt in Hostmaster (Aegir) 5.x
Same filename and directory in other branches
#! /bin/sh
read -p "This will kill your hostmaster install, continue? [y/N]" prompt
if [ "$prompt" != "y" ]; then
echo "Good! wise decision, aborting"
exit 1
else
read -p "No really, are you *sure* you want to do this? [yes/NO!]" prompt
if [ "$prompt" != "yes" ]; then
echo "Phew! had the finger on the button there..."
exit 1
fi
fi
echo "alright, you asked for it (twice!)"
echo "destroying sql database..."
mysql -e 'drop database hostmaster; create database hostmaster;'
echo "removing vhost configs..."
cd /var/hostmaster
rm config/vhost.d/*
echo "updating provision source"
(cd .drush/provision && cvs up )
echo "updating drush source"
(cd drush && cvs up )
echo "restoring default settings.php"
cd drupal-5.x
echo "current database password for hostmaster"
grep '^\$db_url' sites/default/settings.php
echo "removing all sites"
rm -rf sites
cvs up -dP sites
echo "fixing perms on settings.php for drupal install"
chmod 666 sites/default/settings.php
echo updating install profile source
cd profiles/hostmaster; cvs up
echo updating hosting source
(cd modules/hosting; cvs up -C )
File
reset.txtView source
- #! /bin/sh
-
- read -p "This will kill your hostmaster install, continue? [y/N]" prompt
-
- if [ "$prompt" != "y" ]; then
- echo "Good! wise decision, aborting"
- exit 1
- else
- read -p "No really, are you *sure* you want to do this? [yes/NO!]" prompt
- if [ "$prompt" != "yes" ]; then
- echo "Phew! had the finger on the button there..."
- exit 1
- fi
- fi
-
- echo "alright, you asked for it (twice!)"
-
- echo "destroying sql database..."
- mysql -e 'drop database hostmaster; create database hostmaster;'
-
- echo "removing vhost configs..."
- cd /var/hostmaster
- rm config/vhost.d/*
-
- echo "updating provision source"
- (cd .drush/provision && cvs up )
-
- echo "updating drush source"
- (cd drush && cvs up )
-
- echo "restoring default settings.php"
- cd drupal-5.x
- echo "current database password for hostmaster"
- grep '^\$db_url' sites/default/settings.php
- echo "removing all sites"
- rm -rf sites
- cvs up -dP sites
- echo "fixing perms on settings.php for drupal install"
- chmod 666 sites/default/settings.php
-
- echo updating install profile source
- cd profiles/hostmaster; cvs up
- echo updating hosting source
- (cd modules/hosting; cvs up -C )