| 1 |
#! /bin/sh
|
| 2 |
|
| 3 |
read -p "This will kill your hostmaster install, continue? [y/N]" prompt
|
| 4 |
|
| 5 |
if [ "$prompt" != "y" ]; then
|
| 6 |
echo "Good! wise decision, aborting"
|
| 7 |
exit 1
|
| 8 |
else
|
| 9 |
read -p "No really, are you *sure* you want to do this? [yes/NO!]" prompt
|
| 10 |
if [ "$prompt" != "yes" ]; then
|
| 11 |
echo "Phew! had the finger on the button there..."
|
| 12 |
exit 1
|
| 13 |
fi
|
| 14 |
fi
|
| 15 |
|
| 16 |
echo "alright, you asked for it (twice!)"
|
| 17 |
|
| 18 |
echo "destroying sql database..."
|
| 19 |
mysql -e 'drop database hostmaster; create database hostmaster;'
|
| 20 |
|
| 21 |
echo "removing vhost configs..."
|
| 22 |
cd /var/hostmaster
|
| 23 |
rm config/vhost.d/*
|
| 24 |
|
| 25 |
echo "updating provision source"
|
| 26 |
(cd .drush/provision && cvs up )
|
| 27 |
|
| 28 |
echo "updating drush source"
|
| 29 |
(cd drush && cvs up )
|
| 30 |
|
| 31 |
echo "restoring default settings.php"
|
| 32 |
cd drupal-5.x
|
| 33 |
echo "current database password for hostmaster"
|
| 34 |
grep '^\$db_url' sites/default/settings.php
|
| 35 |
echo "removing all sites"
|
| 36 |
rm -rf sites
|
| 37 |
cvs up -dP sites
|
| 38 |
echo "fixing perms on settings.php for drupal install"
|
| 39 |
chmod 666 sites/default/settings.php
|
| 40 |
|
| 41 |
echo updating install profile source
|
| 42 |
cd profiles/hostmaster; cvs up
|
| 43 |
echo updating hosting source
|
| 44 |
(cd modules/hosting; cvs up -C )
|