svn commit: r1308650 - /ofbiz/trunk/tools/rc.ofbiz.for.ubuntu

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1308650 - /ofbiz/trunk/tools/rc.ofbiz.for.ubuntu

hansbak-2
Author: hansbak
Date: Tue Apr  3 02:03:57 2012
New Revision: 1308650

URL: http://svn.apache.org/viewvc?rev=1308650&view=rev
Log:
startup script improvements

Modified:
    ofbiz/trunk/tools/rc.ofbiz.for.ubuntu

Modified: ofbiz/trunk/tools/rc.ofbiz.for.ubuntu
URL: http://svn.apache.org/viewvc/ofbiz/trunk/tools/rc.ofbiz.for.ubuntu?rev=1308650&r1=1308649&r2=1308650&view=diff
==============================================================================
--- ofbiz/trunk/tools/rc.ofbiz.for.ubuntu (original)
+++ ofbiz/trunk/tools/rc.ofbiz.for.ubuntu Tue Apr  3 02:03:57 2012
@@ -32,14 +32,18 @@ OFBIZDIR="ofbiz"
 
 # Start OFBiz
 start() {
+    if [ "$USER" = "" ]; then
+        echo "Mounting data disk at boottime here"
+#        mount /dev/sdg /data
+    fi
     running
     if [ "$OFBIZ_PROCS" = "" ]; then
         echo "Ofbiz is already running..."
         return 0
     fi
     if [ "$USER" = "$OFBIZUSER" ]; then
-        echo "starting standard ~/$OFBIZDIR/startofbiz.sh"
-        cd ~/$OFBIZDIR
+        echo "starting standard /home/$OFBIZUSER/$OFBIZDIR/startofbiz.sh"
+        cd /home/$OFBIZUSER/$OFBIZDIR
         ./startofbiz.sh
         if [ $? = 0 ]; then
             echo "start success"
@@ -53,7 +57,7 @@ start() {
 stop() {
     if [ "$USER" = "$OFBIZUSER" ]; then
         echo "stopping standard /home/$OFBIZUSER/$OFBIZDIR/stopofbiz.sh"
-        cd ~/$OFBIZDIR
+        cd /home/$OFBIZUSER/$OFBIZDIR
     MAXCOUNT=10
         COUNTER=0
         until [ $COUNTER -gt $MAXCOUNT ]; do
@@ -76,8 +80,6 @@ stop() {
 checkUser() {
     if [ "$USER" != "$OFBIZUSER" ]; then
         if [ "$USER" = "" ]; then
-#           echo "Mounting data disk at boot"
-#           mount /dev/sdf /backup
             exec su - $OFBIZUSER -c "$0 $1 "
     else
         exec sudo -u $OFBIZUSER $0 $1