4 echo "Cleaning up the database"
5 if type invoke-rc.d 2>/dev/null
7 invoke-rc.d apache2 stop
8 invoke-rc.d postgresql restart
11 service postgresql restart
14 su - postgres -c "dropdb -e $1"
15 echo "Executing: pg_restore -C -d template1 < /root/dump"
16 su - postgres -c "pg_restore -C -d template1" < /root/dump
18 if type invoke-rc.d 2>/dev/null
20 invoke-rc.d apache2 start