/ Published in: Bash

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#! /bin/bash ########################################### port_check=`/usr/sbin/lsof -i :[port-number]|wc -l` ########################################### if [ $port_check -ge "1" ]; then exit 0 else pkill -f '/usr/local/bin/php -f /home/path/to/file.php' /usr/local/bin/php -f /home/path/to/file.php > /dev/null & fi
URL: http://forums.cpanel.net/f5/check-php-cli-process-running-184662.html
Comments
