mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
system: part 2/4 #2876
This commit is contained in:
parent
8462c5457f
commit
eccc9eea1f
@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
BACKUPFILE="/conf/netflow.tgz"
|
||||
BACKUPDIR="/var/netflow"
|
||||
BACKUPFILE="/conf/netflow.tgz"
|
||||
BACKUPOFF="<netflowbackup>-1</netflowbackup>"
|
||||
|
||||
# find out if the service is running and stop/start it only if needed
|
||||
RCSCRIPT="/usr/local/etc/rc.d/flowd_aggregate"
|
||||
@ -9,7 +10,9 @@ if ! ${RCSCRIPT} status > /dev/null; then
|
||||
RCSCRIPT="true"
|
||||
fi
|
||||
|
||||
if [ "${1}" = "restore" ]; then
|
||||
if [ "$(grep -c "${BACKUPOFF}" /conf/config.xml)" != "0" ]; then
|
||||
rm -f ${BACKUPFILE}
|
||||
elif [ "${1}" = "restore" ]; then
|
||||
if [ -f "${BACKUPFILE}" ]; then
|
||||
${RCSCRIPT} stop
|
||||
tar -C / -xzpf "${BACKUPFILE}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user