Commit b72bfe22 authored by Franco Fichtner's avatar Franco Fichtner

netflow: avoid db corruption by stopping service; closes #1017

Inspired by: @adschellevis
parent 6c8c91a1
......@@ -9,6 +9,10 @@ if [ "${1}" == "restore" ]; then
fi
else
if [ -d "${BACKUPDIR}" ]; then
/usr/local/etc/rc.d/flowd_aggregate stop
tar -C / -czf "${BACKUPFILE}" "${BACKUPDIR}"
if [ "${1}" == "stop" ]; then
/usr/local/etc/rc.d/flowd_aggregate start
fi
fi
fi
......@@ -10,9 +10,9 @@
/usr/local/etc/rc.opnsense stop
# backup volatile internals
/usr/local/etc/rc.backup_dhcpleases
/usr/local/etc/rc.backup_netflow
/usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_dhcpleases stop
/usr/local/etc/rc.backup_netflow stop
/usr/local/etc/rc.backup_rrd stop
# wait for config lock to release
php -a >/dev/null << EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment