in reply to Re^15: show a message only during the sleep time
in thread show a message only during the sleep time

this script should stop the ntop and start it again after 8 seconds.

I did some tests and ntop will be stopped with:
my $stop = `/usr/local/bin/sudo /usr/local/www/cgi-bin/ntop/ntop.sh st +op` or die "cannot stop ntop: $!";
and started again with:
<br> my $start = `/usr/local/bin/sudo /usr/local/www/cgi-bin/ntop/ntop.sh s +tart` or die "cannot start ntop: $!";
I cannot see errors on the ntop output.

I have only one problem if the ntop is already running,
an I start the script, I don't get any errors,
but if it was stopped before,
then I get an error:
Software error: cannot stop ntop: at /usr/local/www/cgi-bin/ntop/ntop.cgi line 41.

it needs to check first if the ntop is already running and then stop it.