mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 10:35:27 +00:00
19 lines
387 B
Bash
Executable File
19 lines
387 B
Bash
Executable File
#!/bin/sh
|
|
|
|
BACKUPFILE="/conf/netflow.tgz"
|
|
BACKUPDIR="/var/netflow"
|
|
|
|
if [ "${1}" = "restore" ]; then
|
|
if [ -f "${BACKUPFILE}" ]; then
|
|
tar -C / -xzpf "${BACKUPFILE}"
|
|
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
|