summaryrefslogtreecommitdiff
path: root/FS-Test/bin/freeside-test-stop
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-08-06 19:38:41 -0700
committerMark Wells <mark@freeside.biz>2015-08-06 19:38:41 -0700
commitca36c08592ef9e91641d2a6e1d2c40c2314692d9 (patch)
tree4c7b4924e8a7b3791dd83ef09e20c73ce1703dbf /FS-Test/bin/freeside-test-stop
parenta2c11a9d32cdeb406f08e0a5df3ff1f70e56e9c7 (diff)
update tests
Diffstat (limited to 'FS-Test/bin/freeside-test-stop')
-rwxr-xr-xFS-Test/bin/freeside-test-stop7
1 files changed, 4 insertions, 3 deletions
diff --git a/FS-Test/bin/freeside-test-stop b/FS-Test/bin/freeside-test-stop
index 2c62c10cd..7c67f54ec 100755
--- a/FS-Test/bin/freeside-test-stop
+++ b/FS-Test/bin/freeside-test-stop
@@ -5,11 +5,12 @@ set -ae
echo "Stopping Apache."
sudo service apache2 stop
-echo "Resetting clock."
-sudo hwclock --hctosys
-
newname=freeside_test_`date +%Y%m%d`
if psql -l |grep -q '^ *freeside '; then
+ if psql -l |grep -q $newname; then
+ echo "Deleting old test database $newname."
+ dropdb "$newname"
+ fi
echo "Renaming test database to $newname."
psql postgres -c "ALTER DATABASE freeside RENAME TO $newname"
fi