backup: tweak previous

This commit is contained in:
Franco Fichtner 2016-07-25 17:33:05 +00:00
parent b72bfe2241
commit f034bccf4c
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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