Commit 218661d7 authored by Ad Schellevis's avatar Ad Schellevis

add squid proxy to legacy service status page

parent 7a277785
...@@ -175,6 +175,10 @@ if (!function_exists('get_services')) { ...@@ -175,6 +175,10 @@ if (!function_exists('get_services')) {
$pconfig['description'] = gettext("Server load balancing daemon"); $pconfig['description'] = gettext("Server load balancing daemon");
$services[] = $pconfig; $services[] = $pconfig;
} }
if (isset($config['OPNsense']['proxy']['general']['enabled']) && $config['OPNsense']['proxy']['general']['enabled'] == 1) {
$services[] = array('name'=>'squid', 'description' => gettext("Proxy server"));
}
return $services; return $services;
} }
...@@ -393,6 +397,8 @@ if (!function_exists('service_control_start')) { ...@@ -393,6 +397,8 @@ if (!function_exists('service_control_start')) {
case 'relayd': case 'relayd':
relayd_configure(); relayd_configure();
break; break;
case 'squid':
configd_run("proxy start");
default: default:
log_error(gettext("Could not start unknown service `%s'", $name)); log_error(gettext("Could not start unknown service `%s'", $name));
break; break;
...@@ -466,6 +472,8 @@ if (!function_exists('service_control_stop')) { ...@@ -466,6 +472,8 @@ if (!function_exists('service_control_stop')) {
case 'relayd': case 'relayd':
mwexec('pkill relayd'); mwexec('pkill relayd');
break; break;
case 'squid':
configd_run("proxy stop");
default: default:
log_error(gettext("Could not stop unknown service `%s'", $name)); log_error(gettext("Could not stop unknown service `%s'", $name));
break; break;
...@@ -537,6 +545,8 @@ if (!function_exists('service_control_restart')) { ...@@ -537,6 +545,8 @@ if (!function_exists('service_control_restart')) {
case 'relayd': case 'relayd':
relayd_configure(true); relayd_configure(true);
break; break;
case 'squid':
configd_run("proxy restart");
default: default:
log_error(gettext("Could not restart unknown service `%s'", $name)); log_error(gettext("Could not restart unknown service `%s'", $name));
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment