Commit 477fba11 authored by Franco Fichtner's avatar Franco Fichtner

src: switch template reload to new slash notation; #1238

parent 53f44c89
...@@ -766,7 +766,7 @@ function system_syslogd_start() ...@@ -766,7 +766,7 @@ function system_syslogd_start()
global $config, $g; global $config, $g;
/* XXX temporary hook for newsyslog.conf regeneration */ /* XXX temporary hook for newsyslog.conf regeneration */
configd_run('template reload OPNsense.Syslog'); configd_run('template reload OPNsense/Syslog');
mwexec('/etc/rc.d/hostid start'); mwexec('/etc/rc.d/hostid start');
...@@ -1880,7 +1880,7 @@ function system_login_configure() ...@@ -1880,7 +1880,7 @@ function system_login_configure()
{ {
global $config; global $config;
configd_run('template reload OPNsense.Auth'); configd_run('template reload OPNsense/Auth');
$serialspeed = (!empty($config['system']['serialspeed']) && is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : '115200'; $serialspeed = (!empty($config['system']['serialspeed']) && is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : '115200';
$serial_enabled = isset($config['system']['enableserial']); $serial_enabled = isset($config['system']['enableserial']);
......
...@@ -53,11 +53,11 @@ class ServiceController extends ApiControllerBase ...@@ -53,11 +53,11 @@ class ServiceController extends ApiControllerBase
$backend = new Backend(); $backend = new Backend();
// the ipfw rules need to know about all the zones, so we need to reload ipfw for the portal to work // the ipfw rules need to know about all the zones, so we need to reload ipfw for the portal to work
$backend->configdRun("template reload OPNsense.IPFW"); $backend->configdRun('template reload OPNsense/IPFW');
$bckresult = trim($backend->configdRun("ipfw reload")); $bckresult = trim($backend->configdRun("ipfw reload"));
if ($bckresult == "OK") { if ($bckresult == "OK") {
// generate captive portal config // generate captive portal config
$bckresult = trim($backend->configdRun("template reload OPNsense.Captiveportal")); $bckresult = trim($backend->configdRun('template reload OPNsense/Captiveportal'));
if ($bckresult == "OK") { if ($bckresult == "OK") {
$mdlCP = new CaptivePortal(); $mdlCP = new CaptivePortal();
if ($mdlCP->isEnabled()) { if ($mdlCP->isEnabled()) {
......
...@@ -54,7 +54,7 @@ class ServiceController extends ApiControllerBase ...@@ -54,7 +54,7 @@ class ServiceController extends ApiControllerBase
$backend = new Backend(); $backend = new Backend();
// generate template // generate template
$backend->configdRun("template reload OPNsense.Cron"); $backend->configdRun('template reload OPNsense/Cron');
// (res)start daemon // (res)start daemon
$backend->configdRun("cron restart"); $backend->configdRun("cron restart");
......
...@@ -125,7 +125,7 @@ class NetflowController extends ApiControllerBase ...@@ -125,7 +125,7 @@ class NetflowController extends ApiControllerBase
// reconfigure netflow // reconfigure netflow
$backend = new Backend(); $backend = new Backend();
$backend->configdRun("template reload OPNsense.Netflow"); $backend->configdRun('template reload OPNsense/Netflow');
// restart netflow, by calling stop (which will always stop the collectors) and start // restart netflow, by calling stop (which will always stop the collectors) and start
// (which will only start if there are collectors configured) // (which will only start if there are collectors configured)
$backend->configdRun("netflow stop"); $backend->configdRun("netflow stop");
......
...@@ -146,7 +146,7 @@ class ServiceController extends ApiControllerBase ...@@ -146,7 +146,7 @@ class ServiceController extends ApiControllerBase
} }
$backend = new Backend(); $backend = new Backend();
$bckresult = trim($backend->configdRun("template reload OPNsense.IDS")); $bckresult = trim($backend->configdRun('template reload OPNsense/IDS'));
if ($bckresult == "OK") { if ($bckresult == "OK") {
if ((string)$mdlIDS->general->enabled == 1) { if ((string)$mdlIDS->general->enabled == 1) {
...@@ -186,7 +186,7 @@ class ServiceController extends ApiControllerBase ...@@ -186,7 +186,7 @@ class ServiceController extends ApiControllerBase
// we have to trigger a template reload to be sure we have the right download configuration // we have to trigger a template reload to be sure we have the right download configuration
// ideally we should only regenerate the download config, but that's not supported at the moment. // ideally we should only regenerate the download config, but that's not supported at the moment.
// (not sure if it should be supported) // (not sure if it should be supported)
$bckresult = trim($backend->configdRun("template reload OPNsense.IDS")); $bckresult = trim($backend->configdRun('template reload OPNsense/IDS'));
if ($bckresult == "OK") { if ($bckresult == "OK") {
if ($wait != null) { if ($wait != null) {
...@@ -216,7 +216,7 @@ class ServiceController extends ApiControllerBase ...@@ -216,7 +216,7 @@ class ServiceController extends ApiControllerBase
$this->sessionClose(); $this->sessionClose();
$backend = new Backend(); $backend = new Backend();
// flush rule configuration // flush rule configuration
$bckresult = trim($backend->configdRun("template reload OPNsense.IDS")); $bckresult = trim($backend->configdRun('template reload OPNsense/IDS'));
if ($bckresult == "OK") { if ($bckresult == "OK") {
$status = $backend->configdRun("ids reload"); $status = $backend->configdRun("ids reload");
} else { } else {
......
...@@ -145,7 +145,7 @@ class ServiceController extends ApiControllerBase ...@@ -145,7 +145,7 @@ class ServiceController extends ApiControllerBase
} }
// generate template // generate template
$backend->configdRun("template reload OPNsense.Proxy"); $backend->configdRun('template reload OPNsense/Proxy');
// (res)start daemon // (res)start daemon
if ($mdlProxy->general->enabled->__toString() == 1) { if ($mdlProxy->general->enabled->__toString() == 1) {
...@@ -172,7 +172,7 @@ class ServiceController extends ApiControllerBase ...@@ -172,7 +172,7 @@ class ServiceController extends ApiControllerBase
if ($this->request->isPost()) { if ($this->request->isPost()) {
$backend = new Backend(); $backend = new Backend();
// generate template // generate template
$backend->configdRun("template reload OPNsense.Proxy"); $backend->configdRun('template reload OPNsense/Proxy');
// fetch files // fetch files
$response = $backend->configdRun("proxy fetchacls"); $response = $backend->configdRun("proxy fetchacls");
...@@ -191,7 +191,7 @@ class ServiceController extends ApiControllerBase ...@@ -191,7 +191,7 @@ class ServiceController extends ApiControllerBase
if ($this->request->isPost()) { if ($this->request->isPost()) {
$backend = new Backend(); $backend = new Backend();
// generate template // generate template
$backend->configdRun("template reload OPNsense.Proxy"); $backend->configdRun('template reload OPNsense/Proxy');
// download files // download files
$response = $backend->configdRun("proxy downloadacls"); $response = $backend->configdRun("proxy downloadacls");
......
...@@ -48,7 +48,7 @@ class ServiceController extends ApiControllerBase ...@@ -48,7 +48,7 @@ class ServiceController extends ApiControllerBase
$this->sessionClose(); $this->sessionClose();
$backend = new Backend(); $backend = new Backend();
$backend->configdRun("template reload OPNsense.IPFW"); $backend->configdRun('template reload OPNsense/IPFW');
$bckresult = trim($backend->configdRun("ipfw reload")); $bckresult = trim($backend->configdRun("ipfw reload"));
if ($bckresult == "OK") { if ($bckresult == "OK") {
$status = "ok"; $status = "ok";
......
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