mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
backup: tweak previous
This commit is contained in:
parent
b72bfe2241
commit
f034bccf4c
@ -3,7 +3,7 @@
|
||||
BACKUPFILE="/conf/dhcpleases.tgz"
|
||||
BACKUPDIR="/var/dhcpd/var/db"
|
||||
|
||||
if [ "${1}" == "restore" ]; then
|
||||
if [ "${1}" = "restore" ]; then
|
||||
if [ -f "${BACKUPFILE}" ]; then
|
||||
tar -C / -xzf "${BACKUPFILE}"
|
||||
fi
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
BACKUPFILE="/conf/netflow.tgz"
|
||||
BACKUPDIR="/var/netflow"
|
||||
|
||||
if [ "${1}" == "restore" ]; then
|
||||
if [ "${1}" = "restore" ]; then
|
||||
if [ -f "${BACKUPFILE}" ]; then
|
||||
tar -C / -xzf "${BACKUPFILE}"
|
||||
fi
|
||||
@ -11,7 +11,7 @@ else
|
||||
if [ -d "${BACKUPDIR}" ]; then
|
||||
/usr/local/etc/rc.d/flowd_aggregate stop
|
||||
tar -C / -czf "${BACKUPFILE}" "${BACKUPDIR}"
|
||||
if [ "${1}" == "stop" ]; then
|
||||
if [ "${1}" = "stop" ]; then
|
||||
/usr/local/etc/rc.d/flowd_aggregate start
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
BACKUPDIR="/var/db/rrd"
|
||||
BACKUPFILE="/conf/rrd.tgz"
|
||||
|
||||
if [ "${1}" == "restore" ]; then
|
||||
if [ "${1}" = "restore" ]; then
|
||||
if [ -f "${BACKUPFILE}" ]; then
|
||||
tar -C / -xzf "${BACKUPFILE}"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user