Xu Xiaodong avatar Xu Xiaodong committed 29221af

add lampp

Comments (0)

Files changed (1)

 # modified:  2011 May 31
 #
 
-TOMCAT_GD=/opt/guangdong_apache-tomcat-6.0.32
-TOMCAT_SH=/opt/shanghai_apache-tomcat-6.0.32
+TOMCAT_BASE=tomcat-6.0.32
+TOMCAT_GD=/opt/ubox_guangdong_"$TOMCAT_BASE"
+TOMCAT_SH=/opt/ubox_shanghai_"$TOMCAT_BASE"
+LAMPP="/opt/lampp/lampp start"
 RC=/etc/rc.d/rc.local
+USER=ubox
 
-if [ -e "$RC" ]; then
+if [ ! -e "$RC" ]; then
+  touch "$RC"
+fi
+
+if [ ! -x "$RC" ]; then
+  chmod a+x "$RC"
+fi
+
+if [ -e "$RC" ] && [ -x "$RC" ]; then
   for VER in "$TOMCAT_GD" "$TOMCAT_SH"
   do
-    chown -R ubox:ubox "$VER"
+    chown -R "$USER":"$USER" "$VER" 2> /dev/null
     echo su ubox "$VER"/bin/startup.sh >> "$RC"
 
     if [ "$?" -eq 0 ]; then
       echo "$VER"/bin/startup.sh added to "$RC"
     fi
   done
+
+  echo "$LAMPP" >> "$RC"
+  if [ "$?" -eq 0 ]; then
+    echo "$LAMPP" added to "$RC"
+  fi
 fi
-
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.