Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
54f0787c
Commit
54f0787c
authored
Feb 10, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ids) add reloadRules action to api
parent
1e1aae8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
ServiceController.php
...vc/app/controllers/OPNsense/IDS/Api/ServiceController.php
+22
-0
No files found.
src/opnsense/mvc/app/controllers/OPNsense/IDS/Api/ServiceController.php
View file @
54f0787c
...
@@ -205,6 +205,28 @@ class ServiceController extends ApiControllerBase
...
@@ -205,6 +205,28 @@ class ServiceController extends ApiControllerBase
return
array
(
"status"
=>
$status
);
return
array
(
"status"
=>
$status
);
}
}
/**
* flush rule configuration to config and reload suricata ruleset (graceful restart)
* @return array
*/
public
function
reloadRulesAction
()
{
$status
=
"failed"
;
if
(
$this
->
request
->
isPost
())
{
// close session for long running action
$this
->
sessionClose
();
$backend
=
new
Backend
();
// flush rule configuration
$bckresult
=
trim
(
$backend
->
configdRun
(
"template reload OPNsense.IDS"
));
if
(
$bckresult
==
"OK"
)
{
$status
=
$backend
->
configdRun
(
"ids reload"
,
$detach
);
}
else
{
$status
=
"template error"
;
}
}
return
array
(
"status"
=>
$status
);
}
/**
/**
* query suricata alerts
* query suricata alerts
* @return array
* @return array
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment