You are here

reset.txt in Hostmaster (Aegir) 6.2

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