in reply to Re^5: show a message only during the sleep time
in thread show a message only during the sleep time
#!/usr/bin/perl -w use strict; use warnings; use CGI; my $query = new CGI; use CGI::Carp qw(fatalsToBrowser); $|=1; print <<EOF; <html> <head> <title>ntop startup script</title> <STYLE TYPE='text/css'> h3 { color: red } a { text-decoration: none; font: bold 14pt/16pt Ariel, serif } a:hover { color: red } /* when mouse is over link */ </style> <script language="javascript"> function hideWaitMsg(){ var obj = getElementById('wait_msg_text'); obj.visible = false; } </script> </head> <body bgcolor='#c0c0d0' onLoad="hideWaitMsg()"> <center> <p><br></p> <p><br></p> <div id="wait_msg_text">pls wait, ntop will be started</div> EOF system `/usr/local/www/cgi-bin/ntop/ntop.sh stop` or die "cannot stop +ntop: $!"; sleep(8); my $cc = `sudo /usr/local/www/cgi-bin/ntop/ntop.sh start` or die "cann +ot start ntop: $!"; print "<font face=\"arial,helvetica\" size=2 color=\"#006600\">status: +</font> ",$cc,"<br><br>\n"; print "<font face=\"arial,helvetica\" size=2 color=\"#FF0000\"> pls do not forget to shutdown, if you're not using </font> \n"; print "\n"; print "<p><br></p>"; print "pls wait for 5 seconds before you click on this link:\n"; print "<br><br>"; print "<a href=\"https://192.168.0.3:3001\"><b><U>NTOP</b></U></a>\n"; print "<p><br></p>"; print "<p><br></p>"; print "<p><br></p>"; print "<p><br></p>"; print "Maintained by <a href=\"mailto:admin@\domain.net\"><font face=\ +"arial,helvetica\" size=3> admin</a></font>\n"; print "</center>"; print "</body>"; print "</html>"; exit($cc);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: show a message only during the sleep time
by davidrw (Prior) on Jul 25, 2005 at 00:55 UTC | |
by cc (Beadle) on Jul 25, 2005 at 12:35 UTC | |
by davidrw (Prior) on Jul 25, 2005 at 13:37 UTC | |
by cc (Beadle) on Jul 25, 2005 at 18:10 UTC | |
by merlyn (Sage) on Jul 25, 2005 at 18:59 UTC | |
|