Commit f034bccf authored by Franco Fichtner's avatar Franco Fichtner

backup: tweak previous

parent b72bfe22
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
BACKUPFILE="/conf/dhcpleases.tgz" BACKUPFILE="/conf/dhcpleases.tgz"
BACKUPDIR="/var/dhcpd/var/db" BACKUPDIR="/var/dhcpd/var/db"
if [ "${1}" == "restore" ]; then if [ "${1}" = "restore" ]; then
if [ -f "${BACKUPFILE}" ]; then if [ -f "${BACKUPFILE}" ]; then
tar -C / -xzf "${BACKUPFILE}" tar -C / -xzf "${BACKUPFILE}"
fi fi
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
BACKUPFILE="/conf/netflow.tgz" BACKUPFILE="/conf/netflow.tgz"
BACKUPDIR="/var/netflow" BACKUPDIR="/var/netflow"
if [ "${1}" == "restore" ]; then if [ "${1}" = "restore" ]; then
if [ -f "${BACKUPFILE}" ]; then if [ -f "${BACKUPFILE}" ]; then
tar -C / -xzf "${BACKUPFILE}" tar -C / -xzf "${BACKUPFILE}"
fi fi
...@@ -11,7 +11,7 @@ else ...@@ -11,7 +11,7 @@ else
if [ -d "${BACKUPDIR}" ]; then if [ -d "${BACKUPDIR}" ]; then
/usr/local/etc/rc.d/flowd_aggregate stop /usr/local/etc/rc.d/flowd_aggregate stop
tar -C / -czf "${BACKUPFILE}" "${BACKUPDIR}" tar -C / -czf "${BACKUPFILE}" "${BACKUPDIR}"
if [ "${1}" == "stop" ]; then if [ "${1}" = "stop" ]; then
/usr/local/etc/rc.d/flowd_aggregate start /usr/local/etc/rc.d/flowd_aggregate start
fi fi
fi fi
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
BACKUPDIR="/var/db/rrd" BACKUPDIR="/var/db/rrd"
BACKUPFILE="/conf/rrd.tgz" BACKUPFILE="/conf/rrd.tgz"
if [ "${1}" == "restore" ]; then if [ "${1}" = "restore" ]; then
if [ -f "${BACKUPFILE}" ]; then if [ -f "${BACKUPFILE}" ]; then
tar -C / -xzf "${BACKUPFILE}" tar -C / -xzf "${BACKUPFILE}"
fi 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