Menu

Commit [r67]  Maximize  Restore  History

solaris test

jost2345 2004-10-25

changed /trunk/php-java-bridge/php-java-bridge
/trunk/php-java-bridge/php-java-bridge Diff Switch to side-by-side view
--- a/trunk/php-java-bridge/php-java-bridge
+++ b/trunk/php-java-bridge/php-java-bridge
@@ -1,9 +1,9 @@
 #!/bin/bash
-
+set -x
 # Start the server part of the PHP/Java Bridge.  This script will be
 # called by when the php-java-bridge service is started.
 
-PATH=/bin:/usr/bin:$PATH
+PATH=/bin:/usr/bin:$PATH:
 LD_LIBRARY_PATH=/lib:/usr/lib:$LD_LIBRARY_PATH
 LANG=C
 
@@ -11,7 +11,7 @@
 
 
 # if called with non-zero args, invoke
-if ! test $# = 0; then
+if test $# != 0; then
   pid=/var/run/php-java-bridge.pid
   trap 'kill `cat $pid`; rm -f $pid' 2 15
   eval $1; shift
@@ -28,16 +28,20 @@
 # called with zero args, construct args
 echo "<?php phpinfo();?>" | php 2>/dev/null >/tmp/phpinfo.$$
   
-if ! fgrep java /tmp/phpinfo.$$ |
+if fgrep java /tmp/phpinfo.$$ |
      sed 's/<[/a-z ="0-9]*>//g' |
-     grep -q "java support.*Enabled"
-then echo "Error: PHP/Java Bridge module not installed."; exit 1
+     grep "java support.*Enabled" >/dev/null
+then true;
+else
+ echo "Error: PHP/Java Bridge module not installed."; exit 1
 fi
 
 if  fgrep java /tmp/phpinfo.$$ |
     sed 's/<[/a-z ="0-9]*>//g' | 
-    grep -q 'java status.*running'
-then echo "PHP/Java Bridge already running or socketname option not set in /etc/php.d/java.ini"; exit 2;
+    grep 'java status.*not running' >/dev/null
+then true
+else
+    echo "PHP/Java Bridge already running or socketname option not set in /etc/php.d/java.ini"; exit 2;
 fi
 
 cmd=`fgrep java /tmp/phpinfo.$$ |
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.