Clean up code.

This commit is contained in:
Christoph 2018-05-06 22:49:52 +02:00
parent 2a96dfdc8f
commit db1c28271b
2 changed files with 2 additions and 183 deletions

View File

@ -298,3 +298,5 @@ fi
chown ${user}:${user} ${homedir_user}/${_dir}
chown ${user}:${user} ${homedir_user}/${_dir}/*.${_network}
exit 0

View File

@ -278,186 +278,3 @@ cat $office_dir/README.txt
#rm /tmp/README$$
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
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/"
fi
if ssh -l $remote_user ${remote_host} [ -f "${_network}-config/" ] ; then
ssh -l $remote_user ${remote_host} "rm ${_network}-config/"
fi