Major upgrades:

Adding some new files/directories.
Adjust some existing backups.
This commit is contained in:
2017-02-25 04:10:05 +01:00
parent 44f6559042
commit 81dd5e7a2a
3 changed files with 623 additions and 333 deletions

View File

@ -40,6 +40,28 @@ exit
}
manage_files() {
for file in $* ; do
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/$file ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/$file .
ssh -l $remote_user ${remote_host} "rm ${_network}-config/$file"
fi
done
}
manage_archives() {
for archive in $* ; do
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/$archive" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/$archive .
gunzip < $archive | tar -xpf -
rm -f $archive
ssh -l $remote_user ${remote_host} "rm ${_network}-config/$archive"
fi
done
}
while getopts h:u: opt ; do
case $opt in
h) remote_host="$OPTARG"
@ -70,232 +92,152 @@ office_dir=${office_base_dir}/${_network}
mkdir -p $office_dir
cd $office_dir
# - Nameserver Bind
# - /etc/bind/*
# -
manage_archives bind_${_network}.tar.gz
# - OpenVPN:
# - /etc/openvpn/*
# -
# - /root/.openvpn
# -
archives="openvpn_${_network}.tar.gz
root-dot-opennvpndir_${_network}.tar.gz"
manage_archives $archives
scp -o User=$remote_user ${remote_host}:${_network}-config/bind_${_network}.tar.gz .
gunzip < bind_${_network}.tar.gz | tar -xpf -
rm -f bind_${_network}.tar.gz
# - DynDNS
# -
# - /etc/ddclient.conf
# -
manage_files ddclient.conf.${_network}
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/openvpn_${_network}.tar.gz" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/openvpn_${_network}.tar.gz .
gunzip < openvpn_${_network}.tar.gz | tar -xpf -
rm -f openvpn_${_network}.tar.gz
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/root-dot-opennvpndir_${_network}.tar.gz" ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/root-dot-opennvpndir_${_network}.tar.gz .
gunzip < root-dot-opennvpndir_${_network}.tar.gz | tar -xpf -
rm -f root-dot-opennvpndir_${_network}.tar.gz
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/ddclient.conf.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/ddclient.conf.${_network} .
fi
scp -o User=$remote_user ${remote_host}:${_network}-config/dhcpd.conf.${_network} .
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/dhcpd6.conf.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/dhcpd6.conf.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/isc-dhcp6-server.${_network}" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/isc-dhcp6-server.${_network} .
fi
# - DHCP Server
# -
# - /etc/dhcp/dhcpd.conf - /etc/dhcp3/dhcpd.conf
# - /etc/dhcp/dhcpd6.conf - /etc/dhcp3/dhcpd6.conf
# -
# - hosts.lan.conf # dhcp failover kanzlei kiel
# - hosts.w-lan.conf # dhcp failover kanzlei kiel
# -
# - /etc/init.d/isc-dhcp6-server
# -
files="dhcpd.conf.${_network}
dhcpd6.conf.${_network}
isc-dhcp6-server.${_network}
hosts.lan.conf.${_network}
hosts.w-lan.conf.${_network}"
manage_files "$files"
# - DSL PPP
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/dsl-provider.${_network}" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/dsl-provider.${_network} .
fi
_network_name=`echo $_network | tr '[:upper:]' '[:lower:]'`
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/dsl-${_network_name}.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/dsl-${_network_name}.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/pap-secrets.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/pap-secrets.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/chap-secrets.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/chap-secrets.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/email_notice.${_network}" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/email_notice.${_network} .
fi
# - /etc/ppp/peers/*
# -
# - /etc/ppp/pap-secrets
# - /etc/ppp/chap-secrets
# -
# - /etc/ppp/ip-up.d/email_notice
# -
manage_files pap-secrets.${_network} chap-secrets.${_network} email_notice.${_network}
manage_archives etc_ppp_peers_${_network}.tar.gz
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/generic.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/generic.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/generic.db.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/sasl_passwd.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/sasl_passwd.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/sasl_passwd.db.${_network} .
fi
scp -o User=$remote_user ${remote_host}:${_network}-config/mailname.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/main.cf.${_network} .
# - Postfix SMTP
# -
# - /etc/postfix/main.cf
# - /etc/mailname
# - /etc/postfix/generic
# - /etc/postfix/generic.db
# - /etc/postfix/sasl_passwd
# - /etc/postfix/sasl_passwd.db
# -
files="main.cf.${_network}
mailname.${_network}
sasl_passwd.${_network}
sasl_passwd.db.${_network}
generic.${_network}
generic.db.${_network}"
manage_files $files
# - Netzwerk:
# - /etc/hostname
# - /etc/hosts
# - /etc/network/interfaces
# - /etc/resolv.conf
files="hostname.${_network}
hosts.${_network}
interfaces.${_network}
resolv.conf.${_network}"
manage_files $files
# - /root/bin directory
# -
manage_archives root_bin_${_network}.tar.gz
# - /usr/local/src directory
# -
manage_archives usr_local_src_${_network}.tar.gz
# - /usr/local/sbin directory
# -
manage_archives usr_local_sbin_${_network}.tar.gz
scp -o User=$remote_user ${remote_host}:${_network}-config/hostname.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/hosts.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/interfaces.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/rc.local.${_network} .
# - Firewall
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ipt-firewall.service.${_network}" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/ipt-firewall.service.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/ipt-firewall-gateway.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/ipt-firewall-gateway.conf.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ip6t-firewall.service.${_network}" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/ip6t-firewall.service.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/ip6t-firewall-gateway.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/ip6t-firewall-gateway.conf.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ipt-firewall.${_network}" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/ipt-firewall.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/ip6t-firewall.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/ip6t-firewall.${_network} .
fi
# - /etc/systemd/system/ipt-firewall.service
# - /etc/systemd/system/ip6t-firewall.service
# -
# - /etc/init.d/ipt-firewall
# - /etc/init.d/ipt-firewall
# -
# - /etc/ipt-firewall/*
# -
manage_archives etc_ipt-firewall_${_network}.tar.gz
files="ipt-firewall.service.${_network}
ip6t-firewall.service.${_network}
ipt-firewall.${_network}
ip6t-firewall.${_network}
ipt-firewall-gateway.${_network}
ip6t-firewall-gateway.${_network}"
manage_files $files
# - Check Script Onlinestatus
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/check_net.service.${_network}" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/check_net.service.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/check_net.sh.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/netconfig.sh.${_network} .
scp -o User=$remote_user ${remote_host}:${_network}-config/check_net.conf.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/check_net-logrotate.${_network}" ]; then
scp -o User=$remote_user ${remote_host}:${_network}-config/check_net-logrotate.${_network} .
fi
scp -o User=$remote_user ${remote_host}:${_network}-config/resolv.conf.${_network} .
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/cron_root.${_network} ];then
scp -o User=$remote_user ${remote_host}:${_network}-config/cron_root.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/igmpproxy.conf.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/igmpproxy.conf.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/aiccu.conf.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/aiccu.conf.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/aiccu.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/aiccu.${_network} .
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/radvd.conf.${_network} ] ; then
scp -o User=$remote_user ${remote_host}:${_network}-config/radvd.conf.${_network} .
fi
ssh -l $remote_user ${remote_host} "rm ${_network}-config/bind_${_network}.tar.gz"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/openvpn_${_network}.tar.gz"
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/root-dot-opennvpndir_${_network}.tar.gz ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/root-dot-opennvpndir_${_network}.tar.gz"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/ddclient.conf.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ddclient.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/dhcpd.conf.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/dhcpd.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/dhcpd6.conf.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/dhcpd6.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/isc-dhcp6-server.${_network}" ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/isc-dhcp6-server.${_network}"
fi
# - DSL PPP
# - /etc/systemd/system/check_net.service
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/dsl-provider.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/dsl-provider.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/dsl-${_network_name}.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/dsl-${_network_name}.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/pap-secrets.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/pap-secrets.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/chap-secrets.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/chap-secrets.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/email_notice.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/email_notice.${_network}"
fi
# - Postfix
# - /usr/local/sbin/check_net.sh
# - /usr/local/sbin/netconfig.sh
# -
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/generic.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/generic.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/generic.db.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/sasl_passwd.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/sasl_passwd.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/sasl_passwd.db.${_network}"
fi
ssh -l $remote_user ${remote_host} "rm ${_network}-config/mailname.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/main.cf.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/hostname.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/hosts.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/interfaces.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/rc.local.${_network}"
# - Firewall
# - /etc/check_net/*
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ipt-firewall.service.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ipt-firewall.service.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ipt-firewall-gateway.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ipt-firewall-gateway.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ip6t-firewall.service.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ip6t-firewall.service.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ip6t-firewall-gateway.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ip6t-firewall-gateway.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ipt-firewall.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ipt-firewall.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/ip6t-firewall.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ip6t-firewall.${_network}"
fi
# - Check Script Onlinestatus
# - /etc/logrotate.d/check_net
# -
manage_archives etc_check_net_${_network}.tar.gz
files="check_net.service.${_network}
check_net-logrotate.${_network}"
manage_files $files
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/check_net.service.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/check_net.service.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/check_net.sh.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/netconfig.sh.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/check_net.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/check_net-logrotate.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/check_net-logrotate.${_network}"
fi
ssh -l $remote_user ${remote_host} "rm ${_network}-config/resolv.conf.${_network}"
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/cron_root.${_network} ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/cron_root.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/igmpproxy.conf.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/igmpproxy.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/aiccu.conf.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/aiccu.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/aiccu.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/aiccu.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/radvd.conf.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/radvd.conf.${_network}"
fi
# - Other
# -
# - /etc/rc.local
# - /var/spool/cron/crontabs/root
# - /usr/local/igmpproxy/etc/igmpproxy.conf
# - /etc/aiccu.conf
# - /etc/default/aiccu
# - /etc/radvd.conf
# -
files="rc.local.${_network}
cron_root.${_network}
igmpproxy.conf.${_network}
aiccu.conf.${_network}
aiccu.${_network}
radvd.conf.${_network}"
manage_files $files
@ -328,6 +270,173 @@ cat $office_dir/README.txt
exit 0
# ---
# - Delete remote files
# ----
# - Bind
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/bind_${_network}.tar.gz" ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/bind_${_network}.tar.gz"
fi
# - OpenVPN
# -
#if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/openvpn_${_network}.tar.gz" ]; then
# ssh -l $remote_user ${remote_host} "rm ${_network}-config/openvpn_${_network}.tar.gz"
#fi
#if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/root-dot-opennvpndir_${_network}.tar.gz ] ; then
# ssh -l $remote_user ${remote_host} "rm ${_network}-config/root-dot-opennvpndir_${_network}.tar.gz"
#fi
# - DynDNS
# -
#if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/ddclient.conf.${_network} ] ; then
# ssh -l $remote_user ${remote_host} "rm ${_network}-config/ddclient.conf.${_network}"
#fi
# - DHCP Server
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/dhcpd.conf.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/dhcpd.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/dhcpd6.conf.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/dhcpd6.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/isc-dhcp6-server.${_network}" ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/isc-dhcp6-server.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/hosts.lan.conf.${_network}" ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/hosts.lan.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/hosts.w-lan.conf.${_network}" ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/hosts.w-lan.conf.${_network}"
fi
# - DSL PPP
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/etc_ppp_peers_${_network}.tar.gz" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/etc_ppp_peers_${_network}.tar.gz"
fi
#if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/dsl-provider.${_network}" ] ; then
# ssh -l $remote_user ${remote_host} "rm ${_network}-config/dsl-provider.${_network}"
#fi
#if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/dsl-${_network_name}.${_network}" ] ; then
# ssh -l $remote_user ${remote_host} "rm ${_network}-config/dsl-${_network_name}.${_network}"
#fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/pap-secrets.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/pap-secrets.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/chap-secrets.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/chap-secrets.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/email_notice.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/email_notice.${_network}"
fi
# - Postfix
# -
ssh -l $remote_user ${remote_host} "rm ${_network}-config/main.cf.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/mailname.${_network}"
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/sasl_passwd.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/sasl_passwd.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/sasl_passwd.db.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/generic.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/generic.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/generic.db.${_network}"
fi
# - Netzwerk
# -
ssh -l $remote_user ${remote_host} "rm ${_network}-config/hostname.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/hosts.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/interfaces.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/resolv.conf.${_network}"
ssh -l $remote_user ${remote_host} "rm ${_network}-config/rc.local.${_network}"
# - /root/bin directory
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/root_bin_${_network}.tar.gz" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/root_bin_${_network}.tar.gz"
fi
# - /usr/local/src directory
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/usr_local_src_${_network}.tar.gz" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/usr_local_src_${_network}.tar.gz"
fi
# - /usr/local/sbin directory
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/usr_local_sbin_${_network}.tar.gz" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/usr_local_sbin_${_network}.tar.gz"
fi
# - Firewall
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/etc_ipt-firewall_${_network}.tar.gz" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/etc_ipt-firewall_${_network}.tar.gz"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ipt-firewall.service.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ipt-firewall.service.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ip6t-firewall.service.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ip6t-firewall.service.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ipt-firewall.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ipt-firewall.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/ip6t-firewall.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ip6t-firewall.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ipt-firewall-gateway.${_network}" ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ipt-firewall-gateway.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/ip6t-firewall-gateway.${_network}" ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/ipt-firewall-gateway.${_network}"
fi
# - Check Script Onlinestatus
# -
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/etc_check_net_${_network}.tar.gz" ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/etc_check_net_${_network}.tar.gz"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/check_net.service.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/check_net.service.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/check_net-logrotate.${_network}" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/check_net-logrotate.${_network}"
fi
# - Other
# -
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/cron_root.${_network} ]; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/cron_root.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/igmpproxy.conf.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/igmpproxy.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/aiccu.conf.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/aiccu.conf.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/aiccu.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/aiccu.${_network}"
fi
if ssh -l $remote_user ${remote_host} [ -f ${_network}-config/radvd.conf.${_network} ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/radvd.conf.${_network}"
fi
# ----------
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/"
fi