Start stopped service.
authorSteve Traylen <Steve.Traylen@cern.ch>
Wed, 20 Aug 2008 13:16:29 +0000 (13:16 +0000)
committerSteve Traylen <Steve.Traylen@cern.ch>
Wed, 20 Aug 2008 13:16:29 +0000 (13:16 +0000)
org.glite.yaim.myproxy/config/functions/config_proxy_server

index 48de34f..dc67554 100644 (file)
@@ -54,6 +54,15 @@ MYPROXY_CONF=${INSTALL_ROOT}/glite/etc/myproxy-server.conf
 MYPROXY_CONF_NEW=${INSTALL_ROOT}/glite/etc/myproxy-server.conf_NEW
 
 
+# Special case where we are upgrading from the old style configuration.
+# with a configuration file myproxy-server.config file.
+pgrep -lf myproxy-server.config 2>&1 > /dev/null
+if [ $? = "0" ] ; then
+   yaimlog INFO "MyProxy Running with old style configuration, stopping"
+   /sbin/service myproxy stop
+fi
+
+
 yaimlog DEBUG "Creating Minimal myproxy configuration."
 cat <<EOF > $MYPROXY_CONF_NEW
 # YAIM generated configuration file for MyProxy
@@ -106,6 +115,13 @@ else
   /etc/init.d/myproxy reload < /dev/null
 fi
 
+/etc/init.d/myproxy status 2>&1 > /dev/null
+if [ $? != "0" ] ; then
+  yaimlog INFO "MyProxy server not running so starting"
+  /etc/init.d/myproxy start
+fi
+
+
 
 return 0
 }