I don't know what flavour of crack cocaine was in my pipe yesterday but the script should be:
if ps ax | grep ntop < /dev/null 2>&1 then : else /etc/init.d/ntop restart > /dev/null 2>&1 exit 0 fi sorry. Ian ------------ Dr Ian Firla Robert Graves Trust | "A partial count of the software available St John's College, Oxford | in just one noncommerical Linux system OX1 3JP - +44-(0)7855-310565 | would have cost about $1.9 billion to develop http://www.robertgraves.org | ... the way Microsoft does it" Bruce Perens On Thu, 26 Sep 2002, Arnt Karlsen wrote: > On Wed, 25 Sep 2002 10:58:21 -0400 (EDT), > Ian Firla <[EMAIL PROTECTED]> wrote in message > <[EMAIL PROTECTED]>: > > > > > Hrmn. A Good Idea (tm) but the "service" routine isn't on my system. > > What are you running? > > ..2.1.3 on RH-7.3. > > > I've taken your code and rewritten it to be more linux distro > > agnostic: > > > > if ps ax | grep ntop > /dev/null 2>&1 > > then : > > else /etc/init.d/ntop restart > /dev/null 2>&1 > > exit 0 > > fi > > ..can we make it respect "which runlevel" and commands? > I use runlevel 4 for production, and the other runlevels > for maintenance, with test configs for the other and our > production config for runlevel 4. > > ..another idea is start it from a web page, when needed. > > -- > ..med vennlig hilsen = with Kind Regards from Arnt... ;-) > ...with a number of polar bear hunters in his ancestry... > Scenarios always come in sets of three: > best case, worst case, and just in case. > > > _______________________________________________ > Ntop mailing list > [EMAIL PROTECTED] > http://lists.ntop.org/mailman/listinfo/ntop > _______________________________________________ Ntop mailing list [EMAIL PROTECTED] http://lists.ntop.org/mailman/listinfo/ntop
