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
9b583454
Commit
9b583454
authored
Jul 01, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ids) make sure the update process can only run once
parent
9908a158
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
rule-updater.py
src/opnsense/scripts/suricata/rule-updater.py
+10
-0
No files found.
src/opnsense/scripts/suricata/rule-updater.py
View file @
9b583454
...
@@ -31,10 +31,20 @@
...
@@ -31,10 +31,20 @@
update suricata rules
update suricata rules
"""
"""
import
os
import
os
import
sys
import
fcntl
from
ConfigParser
import
ConfigParser
from
ConfigParser
import
ConfigParser
from
lib
import
metadata
from
lib
import
metadata
from
lib
import
downloader
from
lib
import
downloader
# check for a running update process, this may take a while so it's better to check...
try
:
lck
=
open
(
'/tmp/suricata-rule-updater.py'
,
'w+'
)
fcntl
.
flock
(
lck
,
fcntl
.
LOCK_EX
|
fcntl
.
LOCK_NB
)
except
IOError
:
# already running, exit status 99
sys
.
exit
(
99
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# load list of configured rules from generated config
# load list of configured rules from generated config
enabled_rulefiles
=
[]
enabled_rulefiles
=
[]
...
...
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