security/tinc: merge cleanups from master

This commit is contained in:
Franco Fichtner 2017-12-11 07:35:55 +01:00
parent c22550cab2
commit bc7b4c27ce
2 changed files with 7 additions and 2 deletions

View file

@ -60,8 +60,10 @@ class ServiceController extends ApiControllerBase
public function startAction()
{
if ($this->request->isPost()) {
// close session for long running action
$this->sessionClose();
$backend = new Backend();
$response = $backend->configdRun("tinc start", true);
$response = $backend->configdRun("tinc start");
return array("response" => $response);
} else {
return array("response" => array());
@ -75,6 +77,8 @@ class ServiceController extends ApiControllerBase
public function stopAction()
{
if ($this->request->isPost()) {
// close session for long running action
$this->sessionClose();
$backend = new Backend();
$response = $backend->configdRun("tinc stop");
return array("response" => $response);
@ -90,6 +94,8 @@ class ServiceController extends ApiControllerBase
public function restartAction()
{
if ($this->request->isPost()) {
// close session for long running action
$this->sessionClose();
$backend = new Backend();
$response = $backend->configdRun("tinc restart");
return array("response" => $response);

View file

@ -38,7 +38,6 @@ class IndexController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = gettext('Tinc VPN');
// link dialogs
$this->view->formDialogNetwork = $this->getForm("dialogNetwork");
$this->view->formDialogHost = $this->getForm("dialogHost");