Hi I have a script who is to restore the channels which disables August but is not it functioning or maybe someone speawdzic why it does not work
Quote:
#!/bin/bash
function detectProcess() {
local process_list=`ps w | grep '$1.*xxx' | grep -v grep > /dev/null`;
if [ ${#process_list} == 0 ]; then
return 0;
else
return 1;
fi
}
while true; do
if $(detectProcess 'rtmpdump'); then
# Logowanie
echo "[`date +'%D %H:%M'`]::Crash transmisji - restart!" >> /xxx.log;
screen -S xxx php WeebTV.php
fi
sleep 35; #Usypia na 20s
done
|