reset.txt 1.09 KB
Newer Older
anarcat's avatar
anarcat committed
1 2
#! /bin/sh

anarcat's avatar
anarcat committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
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..."
19 20
mysql -e 'drop database hostmaster; create database hostmaster;'

anarcat's avatar
anarcat committed
21
echo "removing vhost configs..."
22 23 24
cd /var/hostmaster
rm config/vhost.d/*

anarcat's avatar
anarcat committed
25 26 27 28 29 30 31
echo "updating provision source"
(cd .drush/provision && cvs up )

echo "updating drush source"
(cd drush && cvs up )

echo "restoring default settings.php"
anarcat's avatar
anarcat committed
32
cd drupal-5.x
anarcat's avatar
anarcat committed
33
echo "current database password for hostmaster"
34
grep '^\$db_url' sites/default/settings.php
anarcat's avatar
anarcat committed
35 36 37 38
echo "removing all sites"
rm -rf sites
cvs up -dP sites
echo "fixing perms on settings.php for drupal install"
39
chmod 666 sites/default/settings.php
anarcat's avatar
anarcat committed
40 41

echo updating install profile source
anarcat's avatar
anarcat committed
42
cd profiles/hostmaster; cvs up
anarcat's avatar
anarcat committed
43
echo updating hosting source
44
(cd modules/hosting;  cvs up -C )