Revision: 7275
http://sourceforge.net/p/ipcop/svn/7275
Author: owes
Date: 2014-03-04 10:03:16 +0000 (Tue, 04 Mar 2014)
Log Message:
-----------
In case the proxy is still restarting after message box refreshes, show box
again. Otherwise the proxy page or URL filter page returns and shows 'stopped'.
Modified Paths:
--------------
ipcop/trunk/html/cgi-bin/proxy.cgi
ipcop/trunk/html/cgi-bin/urlfilter.cgi
ipcop/trunk/updates/2.1.3/ROOTFILES.i486-2.1.3
Modified: ipcop/trunk/html/cgi-bin/proxy.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/proxy.cgi 2014-03-04 08:59:05 UTC (rev 7274)
+++ ipcop/trunk/html/cgi-bin/proxy.cgi 2014-03-04 10:03:16 UTC (rev 7275)
@@ -238,6 +238,12 @@
}
}
+# In case proxy is still restarting, show box and refresh
+if (! system("/bin/ps ax | /bin/grep -q [r]estartsquid") ) {
+ &Header::page_show('title', 'warning', $Lang::tr{'web proxy will now
restart'}, "<meta http-equiv='refresh' content='5; URL=/cgi-bin/proxy.cgi' />");
+ exit(0);
+}
+
&Header::showhttpheaders();
$proxysettings{'ACTION'} = '';
Modified: ipcop/trunk/html/cgi-bin/urlfilter.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/urlfilter.cgi 2014-03-04 08:59:05 UTC (rev
7274)
+++ ipcop/trunk/html/cgi-bin/urlfilter.cgi 2014-03-04 10:03:16 UTC (rev
7275)
@@ -368,7 +368,7 @@
&setpermissions($dbdir);
- &restartexit;
+ &restartexit(1);
}
}
@@ -532,7 +532,7 @@
}
if (!$errormessage) {
- &restartexit;
+ &restartexit(1);
}
$tcsettings{'TCMODE'} = 'on';
}
@@ -737,7 +737,7 @@
}
if (!$errormessage) {
- &restartexit;
+ &restartexit(1);
}
$uqsettings{'UQMODE'} = 'on';
}
@@ -1001,7 +1001,7 @@
if (-d $editdir) { system("rm -rf $editdir"); }
unless ($besettings{'NORESTART'} eq 'on') {
- &restartexit;
+ &restartexit(1);
}
}
else {
@@ -1152,6 +1152,11 @@
$checked{'ENABLEQUOTA'}{'on'} = '';
$checked{'ENABLEQUOTA'}{$uqsettings{'ENABLEQUOTA'}} = "checked='checked'";
+# In case proxy is still restarting, show box and refresh
+if (! system("/bin/ps ax | /bin/grep -q [r]estartsquid") ) {
+ &restartexit(0);
+}
+
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'urlfilter configuration'}, 1, '');
@@ -3369,7 +3374,9 @@
sub restartexit
{
- system('/usr/local/bin/restartsquid --waitpid >/dev/null &');
+ my $restart = shift;
+
+ system('/usr/local/bin/restartsquid --waitpid >/dev/null &') if ($restart);
&Header::page_show('title', 'warning', $Lang::tr{'web proxy will now
restart'}, "<meta http-equiv='refresh' content='5; URL=/cgi-bin/urlfilter.cgi'
/>");
exit 0;
}
Modified: ipcop/trunk/updates/2.1.3/ROOTFILES.i486-2.1.3
===================================================================
--- ipcop/trunk/updates/2.1.3/ROOTFILES.i486-2.1.3 2014-03-04 08:59:05 UTC
(rev 7274)
+++ ipcop/trunk/updates/2.1.3/ROOTFILES.i486-2.1.3 2014-03-04 10:03:16 UTC
(rev 7275)
@@ -1,5 +1,7 @@
## please place IPCop files first, then packages sorted by alphabetical order
/home/httpd/cgi-bin/logproxy.cgi
+/home/httpd/cgi-bin/proxy.cgi
+/home/httpd/cgi-bin/urlfilter.cgi
##
## sqlite-3.8.3.1
/usr/bin/sqlite3
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn