tempate slash notation adaption, better print

PR: https://github.com/opnsense/core/issues/1238
This commit is contained in:
Franco Fichtner 2016-10-28 14:58:14 +02:00
parent 7a0ebe0b52
commit 99f5775a98
5 changed files with 7 additions and 5 deletions

View file

@ -127,6 +127,8 @@ scripts-auto:
@if [ -d ${.CURDIR}/src/opnsense/service/templates ]; then \
for FILE in $$(cd ${.CURDIR}/src/opnsense/service/templates && \
find -s . -mindepth 2 -type d); do \
echo "echo -n \"Reloading template $${FILE#./}: \"" >> \
${DESTDIR}/+POST_INSTALL; \
echo "/usr/local/sbin/configctl template reload $${FILE#./}" >> \
${DESTDIR}/+POST_INSTALL; \
done; \

View file

@ -45,7 +45,7 @@ class ServiceController extends ApiControllerBase
$status = "failed";
if ($this->request->isPost()) {
$backend = new Backend();
$bckresult = trim($backend->configdRun("template reload OPNsense.HelloWorld"));
$bckresult = trim($backend->configdRun('template reload OPNsense/HelloWorld'));
if ($bckresult == "OK") {
$status = "ok";
}

View file

@ -163,7 +163,7 @@ class ServiceController extends ApiControllerBase
return trim($backend->configdpRun('ftpproxy ' . $action, array($instance)));
}
if ($action == 'template') {
return trim($backend->configdRun("template reload OPNsense.FtpProxy"));
return trim($backend->configdRun('template reload OPNsense/FtpProxy'));
}
if ($action == 'reload') {
return trim($backend->configdRun("ftpproxy reload"));

View file

@ -134,7 +134,7 @@ class ServiceController extends ApiControllerBase
}
// generate template
$backend->configdRun("template reload OPNsense.HAProxy");
$backend->configdRun('template reload OPNsense/HAProxy');
// (res)start daemon
if ($mdlProxy->general->enabled->__toString() == 1) {
@ -160,7 +160,7 @@ class ServiceController extends ApiControllerBase
{
$backend = new Backend();
// first generate template based on current configuration
$backend->configdRun("template reload OPNsense.HAProxy");
$backend->configdRun('template reload OPNsense/HAProxy');
// now export all the required files (or syntax check will fail)
$backend->configdRun("haproxy setup");
// finally run the syntax check

View file

@ -56,7 +56,7 @@ class ServiceController extends ApiControllerBase
}
}
$backend = new Backend();
$bckresult = trim($backend->configdRun("template reload OPNsense.SSOProxyAD"));
$bckresult = trim($backend->configdRun('template reload OPNsense/SSOProxyAD'));
if ($bckresult == "OK") {
$status = "ok";
}