Project

General

Profile

« Previous | Next » 

Revision d96e7a05

Added by Colin Smith almost 20 years ago

is_process_running(): * grep -v grep * 2 -> 0

View differences:

etc/inc/service-utils.inc
123 123
}
124 124

  
125 125
function is_process_running($process) {
126
    $status = `/bin/ps ax | /usr/bin/grep {$process} | wc -l`;
127
    if($status > 2) return 1;
126
    $status = `/bin/ps ax | /usr/bin/grep {$process} | grep -v grep | wc -l`;
127
    if($status > 0) return 1;
128 128
    return 0;
129 129
}
130 130

  

Also available in: Unified diff