On Wednesday 2004 May 05 23:55, Milver S. Nisay wrote:
> #! /bin/bash
> PATH=/usr/bin:/bin
> export PATH
> date=`date "+%A %m-%d-%Y %r"`
> num=0
> ayos=`/sbin/pidof squid | awk '{ print $1}'`
> if [ $ayos > 0 ] ; then
>   num=1
> fi
> if [ $num = 0  ]; then
>   echo Starting SQUID...
>  #restart squid service
>   /sbin/service squid restart
>  #inform you
>   echo "Restarted at $date" | mail -s "Squid Script Restart "
> [EMAIL PROTECTED]
> else
>   #go and sleep
>   echo Gising ang Squid!
> fi
> #echo "Resulta : " $num $ayos

Kulit ng code mo. :)
Nalimutan ko nga palang lagyan ng output yung sa akin, pasensiya na.

-- 
eman calso
http://www.bloodpet.tk/
"You are old, Father William," the young man said,
        "All your papers these days look the same;
Those William's would be better unread --
        Do these facts never fill you with shame?"

"In my youth," Father William replied to his son,
        "I wrote wonderful papers galore;
But the great reputation I found that I'd won,
        Made it pointless to think any more."

--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie

Reply via email to