cronjob to restart flashplayer
Hi ,
i wrote the following script named /etc/script/midnight.sh
chmod 777 /etc/script/midnight.sh
midnight.sh
#!/bin/sh
#pid=`/bin/ps -ef | /bin/grep /usr/bin/flashplayer`;
pid=`/bin/ps -ef | /bin/grep /usr/bin/flashplayer | grep -v grep| awk -F' ' '{print $2}'`;
if test "$pid" = "" ; then
echo "Process does not run yet!";
else
echo "Killing process..."
kill -9 $pid;
fi
echo "Restarting flashplayer...";
/usr/bin/flashplayer /home/player.swf
[root@localhost script]# crontab -l
@hourly /etc/script/midnight.sh
cron log
Mar 1 19:00:01 localhost crond[3324]: (root) CMD (/etc/script/midnight.sh)
Mar 1 19:01:01 localhost crond[3336]: (root) CMD (run-parts /etc/cron.hourly)
what i waht is ...the player will stop every one hour and than restart(play) in 'demo' user's monitor.
what is wrong . Please help. Thanks.
|