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
b72bfe22
Commit
b72bfe22
authored
Jul 25, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netflow: avoid db corruption by stopping service; closes #1017
Inspired by: @adschellevis
parent
6c8c91a1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
rc.backup_netflow
src/etc/rc.backup_netflow
+4
-0
rc.halt.subr
src/etc/rc.halt.subr
+3
-3
No files found.
src/etc/rc.backup_netflow
View file @
b72bfe22
...
@@ -9,6 +9,10 @@ if [ "${1}" == "restore" ]; then
...
@@ -9,6 +9,10 @@ if [ "${1}" == "restore" ]; then
fi
fi
else
else
if
[
-d
"
${
BACKUPDIR
}
"
]
;
then
if
[
-d
"
${
BACKUPDIR
}
"
]
;
then
/usr/local/etc/rc.d/flowd_aggregate stop
tar
-C
/
-czf
"
${
BACKUPFILE
}
"
"
${
BACKUPDIR
}
"
tar
-C
/
-czf
"
${
BACKUPFILE
}
"
"
${
BACKUPDIR
}
"
if
[
"
${
1
}
"
==
"stop"
]
;
then
/usr/local/etc/rc.d/flowd_aggregate start
fi
fi
fi
fi
fi
src/etc/rc.halt.subr
View file @
b72bfe22
...
@@ -10,9 +10,9 @@
...
@@ -10,9 +10,9 @@
/usr/local/etc/rc.opnsense stop
/usr/local/etc/rc.opnsense stop
# backup volatile internals
# backup volatile internals
/usr/local/etc/rc.backup_dhcpleases
/usr/local/etc/rc.backup_dhcpleases
stop
/usr/local/etc/rc.backup_netflow
/usr/local/etc/rc.backup_netflow
stop
/usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_rrd
stop
# wait for config lock to release
# wait for config lock to release
php
-a
>
/dev/null
<<
EOF
php
-a
>
/dev/null
<<
EOF
...
...
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