Richard Adams wrote:
> 
> >
> > Just do the following
> >       ps aux | grep 'demon name'
> >       kill -HUP 'pid of demon'
> >
> > At least that's what I've always done to restart a process.
> >
> >       --Shawn Craver
> >         University Of Connecticut
> >         Computer Science and Engineering
> >         Undergraduate Student
> >
> 
> No one has mentioned the easyest way, systems like Redhat SuSe use syssv
> init style scripts. To use then one would do;
> cd /etc/rc.d/rc3d
> Take httpd for example
> 
> ./S85httpd will return;
> 
> {start|stop|restart|reload|status}
> 
> ./S85httpd stop
> ./S85httpd start
> 
> > "There's too much blood in my caffine system." -Unknown
> >
> > On Thu, 19 Aug 1999, 1stFlight ! wrote:
> >
> > > Hello,
> > >
> > >     I've been trying to find info on how to restart daemons, can anyone
> > > help me in this area? Restarting the whole system is starting to get
> > > old. TIA
> > >
> > >
> > > Darryl
> > >
> > > --
> > > "Though we are not now that strength which in old days moved earth and
> > > heaven, that which we are, we are; one equal temper of heroic hearts
> > > made weak by time and fate but strong in will to strive, to seek, to
> > > find and not to yield"
> > >
> > > Tennyson's "Ulysses"
> > >
> > >
> > >
> >
> 
> --
> Regards Richard.
> [EMAIL PROTECTED]


True, there is more than one way to do it :)

Also if the daemon (named, apache) drop their PID number into a
flat ASCII file you could do this.

kill -HUP `cat /var/run/http.pid`

Look in /var/run or /var/adm/run to see which daemon drops their
PID down, alot of them do.

In the /usr/local/httpd/bin direct I put that command in a script
called killit, so when I am knee deep in tweaking apache I can
execute the command and then drop over into netscape or logs to 
test it out.

Also in SuSe Linux if you look into the /etc/rc.d you can run those 
scripts without the K50, S34 junk in front of the name, Mmm less
things to type.

You could also use a command like this:

kill -HUP `ps aux | grep [h]ttp | awk '{print $2}'`

but that is properly best left into a shell script.

Reply via email to