mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
tempate slash notation adaption, better print
PR: https://github.com/opnsense/core/issues/1238
This commit is contained in:
parent
7a0ebe0b52
commit
99f5775a98
5 changed files with 7 additions and 5 deletions
|
|
@ -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; \
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue