geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viol...@apache.org
Subject svn commit: r1086499 - /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/gserviceReg.sh
Date Tue, 29 Mar 2011 07:02:13 GMT
Author: violalu
Date: Tue Mar 29 07:02:13 2011
New Revision: 1086499

URL: http://svn.apache.org/viewvc?rev=1086499&view=rev
Log:
Geronimo-5503 fix linux service on ubuntu

Modified:
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/gserviceReg.sh

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/gserviceReg.sh
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/gserviceReg.sh?rev=1086499&r1=1086498&r2=1086499&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/gserviceReg.sh
(original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/gserviceReg.sh
Tue Mar 29 07:02:13 2011
@@ -138,7 +138,7 @@ echo 'ADMIN_PASS=manager'>>"$GSERVICE_NA
 
 echo 'start() {'>>"$GSERVICE_NAME"
 echo 'PID_Count=`ps -ef|grep -i "$GERONIMO_HOME"|awk -FS '\'{print \$2}\'\|wc -l\`>>"$GSERVICE_NAME"
-echo 'if [ $PID_Count -eq 1 ] '>>"$GSERVICE_NAME"        
+echo 'if [ $PID_Count -eq 2 ] '>>"$GSERVICE_NAME"        
 echo 'then'>>"$GSERVICE_NAME"
 echo '{'>>"$GSERVICE_NAME"
 echo 'echo "Server is started already"'>>"$GSERVICE_NAME"
@@ -147,7 +147,9 @@ echo 'else  '>>"$GSERVICE_NAME"
 echo '{'>>"$GSERVICE_NAME"
 if $osUbuntu; then 
 echo 'log_daemon_msg "Starting Server"'>>"$GSERVICE_NAME"
-echo 'JAVA_HOME="$JAVA_HOME" start-stop-daemon --make-pidfile --pidfile /var/run/geronimo-server.pid
--background --user $user --exec "$GERONIMO_HOME"/bin/geronimo.sh --start -- run'>>"$GSERVICE_NAME"
+#karaf shell in geronimo 3.0 make this fail so comment it
+#echo 'JAVA_HOME="$JAVA_HOME" start-stop-daemon --make-pidfile --pidfile /var/run/geronimo-server.pid
--background --user $user --exec "$GERONIMO_HOME"/bin/geronimo --start -- run'>>"$GSERVICE_NAME"
+echo 'su $user -s /bin/bash -c "$GERONIMO_HOME/bin/startup"'>>"$GSERVICE_NAME"
 else
 echo 'echo "Start Server on port $RMI_PORT"'>>"$GSERVICE_NAME"
 echo 'su $user -s /bin/bash -c "$GERONIMO_HOME/bin/startup"'>>"$GSERVICE_NAME"
@@ -159,7 +161,9 @@ echo '}'>>"$GSERVICE_NAME"
 echo 'stop() {'>>"$GSERVICE_NAME"
 if $osUbuntu; then
  echo 'log_daemon_msg "Stopping Server"'>>"$GSERVICE_NAME"
- echo 'killproc -p /var/run/geronimo-server.pid || true'>>"$GSERVICE_NAME"
+ #karaf shell in geronimo 3.0 make this fail
+ #echo 'killproc -p /var/run/geronimo-server.pid || true'>>"$GSERVICE_NAME"
+ echo '"$GERONIMO_HOME"/bin/shutdown --user "$ADMIN_USER" --password "$ADMIN_PASS" --port
"$RMI_PORT"'>>"$GSERVICE_NAME"
 else
 echo 'echo "Shutting down server on port ${RMI_PORT}"'>>"$GSERVICE_NAME"
 echo '"$GERONIMO_HOME"/bin/shutdown --user "$ADMIN_USER" --password "$ADMIN_PASS" --port
"$RMI_PORT"'>>"$GSERVICE_NAME"
@@ -169,7 +173,7 @@ echo '}'>>"$GSERVICE_NAME"
 echo 'restart() {'>>"$GSERVICE_NAME"
 echo 'echo "Restart server on port ${RMI_PORT}"'>>"$GSERVICE_NAME"
 echo 'PID_Count=`ps -ef|grep -i "$GERONIMO_HOME"|awk -FS '\'{print \$2}\'\|wc -l\`>>"$GSERVICE_NAME"
-echo 'if [ $PID_Count -eq 1 ] '>>"$GSERVICE_NAME"        
+echo 'if [ $PID_Count -eq 2 ] '>>"$GSERVICE_NAME"        
 echo 'then'>>"$GSERVICE_NAME"
 echo '{'>>"$GSERVICE_NAME"
 echo '  echo -n -e "\nRestart server.\n"'>>"$GSERVICE_NAME"
@@ -188,7 +192,7 @@ echo '}'>>"$GSERVICE_NAME"
 echo 'status() {'>>"$GSERVICE_NAME"
 echo 'echo -n "Check server status on port ${RMI_PORT}"'>>"$GSERVICE_NAME"
 echo 'PID_Count=`ps -ef|grep -i "$GERONIMO_HOME"|awk -FS '\'{print \$2}\'\|wc -l\`>>"$GSERVICE_NAME"
-echo 'if [ $PID_Count -eq 1 ] '>>"$GSERVICE_NAME"      
+echo 'if [ $PID_Count -eq 2 ] '>>"$GSERVICE_NAME"      
 echo 'then'>>"$GSERVICE_NAME"
 echo 'echo -n -e "\nServer is started.\n"'>>"$GSERVICE_NAME"
 echo 'else'>>"$GSERVICE_NAME"



Mime
View raw message