Author: justi9
Date: 2009-12-16 14:30:03 -0500 (Wed, 16 Dec 2009)
New Revision: 3749
Modified:
mgmt/trunk/mint/bin/mint-database
Log:
Restart postgres if we had to stop it
Modified: mgmt/trunk/mint/bin/mint-database
===================================================================
--- mgmt/trunk/mint/bin/mint-database 2009-12-16 18:48:36 UTC (rev 3748)
+++ mgmt/trunk/mint/bin/mint-database 2009-12-16 19:30:03 UTC (rev 3749)
@@ -142,11 +142,15 @@
exit 1
fi
+ local i_stopped_postgres=""
+
if run "/sbin/service postgresql status"; then
- echo "The database is running. To proceed with configuration, I need to
stop it."
+ echo "The database is running. To proceed with configuration, I need to
stop it"
+ echo "(I'll start it again after I'm done)."
if confirmed; then
run "/sbin/service postgresql stop"
+ i_stopped_postgres="yes"
fi
fi
@@ -160,6 +164,10 @@
modify-postgresql-config
+ if [[ "$i_stopped_postgres" == "yes" ]]; then
+ run "/sbin/service postgresql start"
+ fi
+
echo "The database is configured. You can now run 'mint-database
create'."
# chkconfig stuff ?
Show replies by date