i found this script which checks every few minutes if a file exists.
can anyone help me understand the highlight. it looks like a shell script but how does it trigger the php to look for the file?
Code:#!/usr/local/bin/php -q<?PHP if( !file_exists( "./.pending-hup" ) ) { exit; } $qmailSendPID = intval( `ps -axw | grep qmail-send | grep -v grep | awk '{ print $1 }'` ); if( $qmailSendPID ) { if( !posix_kill( $qmailSendPID, 1 ) ) { echo "ERRO: posix_kill( qmail-send, HUP ) falhou.\n"; } else { @unlink( "./.pending-hup" ); } } ?>



Reply With Quote

Bookmarks