[Sunhelp] A scripting question
Jean-Marc Beaudoin
jmb at merlin.vipxlnet.com
Fri Nov 26 08:51:38 CST 1999
Good day,
Thank You for the information.
It works fine.
Regards,
On Thu, 25 Nov 1999, Adrian Petrescu wrote:
> As far as I remember, "$?" is the exit status of the last executed command.
>
> Let's try something like this:
> -------------------------------------------------------
> #! /bin/ksh
> # Checking if the Apache httpd daemon is running
> _Var=`ps -ef|grep httpd|grep -v grep`
> if [ -z "$_Var" ]
> then
> wall -a $HOME/Message
> /etc/rc3.d/S77apachectl start
> fi
> # End of script
>
> -------------------------------------------------------
>
> You have to create a file called Message in your home directory with the
> message you want to send to the users.
>
> You must check also if the S77apachectl process is executable by the script.
>
> Hope it helps,
> -Adrian-
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> _______________________________________________
> SunHELP maillist - SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
>
Jean-Marc Beaudoin
jmbeaudoin at vipnet.qc.ca
(-: Message 100% Unix :-)
"Unix est aujourd'hui ce que
Windows 2018 espre tre..."
More information about the SunHELP
mailing list