Code

Corrected check_pid
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 Mar 2008 16:09:40 +0000 (16:09 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 Mar 2008 16:09:40 +0000 (16:09 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9688 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server

index 88d672fbe38dcd1dd2ae74a104ae5e451a0d8c2b..c279c7943032a6ed60a22692b090b771be8ac7b6 100755 (executable)
@@ -316,7 +316,8 @@ sub check_pid {
             chomp( $pid );
             if( -f "/proc/$pid/stat" ) {
                 my($stat) = `cat /proc/$pid/stat` =~ m/$pid \((.+)\).*/;
-                if( $0 eq $stat ) {
+                if( $stat ) {
+                                       daemon_log("ERROR: Already running",1);
                     close( LOCK_FILE );
                     exit -1;
                 }