Commit 03b5a9b0 authored by Franco Fichtner's avatar Franco Fichtner

backup: tweak previous

(cherry picked from commit f034bccf)
parent c912205c
......@@ -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
......
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