Author: tmckay
Date: 2011-03-29 17:08:41 +0000 (Tue, 29 Mar 2011)
New Revision: 4671
Modified:
trunk/cumin/bin/cumin-database
Log:
Give user the chance to restart the database server after configuration.
Also, in the case that configure is called and the database server is already
configured, remind the user that the database server needs to be restarted
after configuration.
BZ641406
Modified: trunk/cumin/bin/cumin-database
===================================================================
--- trunk/cumin/bin/cumin-database 2011-03-28 13:10:54 UTC (rev 4670)
+++ trunk/cumin/bin/cumin-database 2011-03-29 17:08:41 UTC (rev 4671)
@@ -169,7 +169,7 @@
stopped=1
for i in 1 2 3 4 5
do
- /sbin/service postgresql condstop && stopped=0
+ run "/sbin/service postgresql condstop" && stopped=0
if [ $stopped -eq 0 ] ; then
break
fi
@@ -221,6 +221,9 @@
if check-configured &> /dev/null; then
echo "Error: The database server is already configured"
+ echo "(Note, the server must be restarted after configuration."
+ echo " If it has not been restarted since configuration, use"
+ echo " 'cumin-database stop' and 'cumin-database start' to
restart it)"
exit 1
fi
@@ -354,8 +357,13 @@
echo "The database server is initialized"
;;
configure)
- configure
- echo "The database server is configured"
+ configure && {
+ echo "The database server is configured"
+ echo -e "\nAfter configuration the server must be restarted."
+ echo -e "Would you like to restart the server now?\n"
+ get-explicit-confirmation
+ restart
+ }
;;
create)
create
Show replies by date