- bind_change_ip.sh: Remove unused and commented code.
- bind_reload_all_zones.sh, bind_disable_ipv6.sh, bind_enable_ipv6.sh: Redesign of the code. Add support for configuration file. -
This commit is contained in:
@@ -175,12 +175,6 @@ else
|
||||
DEFAULT_ZONE_FILE_SLAVE_DIR="${DEFAULT_CONF_FILE_DIR}/slave"
|
||||
fi
|
||||
|
||||
if [[ -n "$ZONE_FILE_SUFFIX" ]] ; then
|
||||
DEFAULT_ZONE_FILE_SUFFIX="$ZONE_FILE_SUFFIX"
|
||||
else
|
||||
DEFAULT_ZONE_FILE_SUFFIX='zone'
|
||||
fi
|
||||
|
||||
if [[ -n "$ZONES_DECLARATION_FILE" ]] ; then
|
||||
DEFAULT_ZONES_DECLARATION_FILE="$ZONES_DECLARATION_FILE"
|
||||
else
|
||||
@@ -365,53 +359,6 @@ if ! $_set_ipv6 && ! $_set_ipv4 ; then
|
||||
fi
|
||||
|
||||
|
||||
#echo ""
|
||||
#echo -e "\033[32m--\033[m"
|
||||
#echo ""
|
||||
#echo "Insert the directory, where your zone-files resides."
|
||||
#echo ""
|
||||
#echo ""
|
||||
#ZONE_FILE_MASTER_DIR=""
|
||||
#if [[ -n "$DEFAULT_ZONE_FILE_MASTER_DIR" ]] ; then
|
||||
# echononl "Zone File Directory (master) [${DEFAULT_ZONE_FILE_MASTER_DIR}]: "
|
||||
# read ZONE_FILE_MASTER_DIR
|
||||
# if [[ "X$ZONE_FILE_MASTER_DIR" = "X" ]]; then
|
||||
# ZONE_FILE_MASTER_DIR="$DEFAULT_ZONE_FILE_MASTER_DIR"
|
||||
# fi
|
||||
#else
|
||||
# echononl "Zone File Directory (master): "
|
||||
# read ZONE_FILE_MASTER_DIR
|
||||
# while [ "X$ZONE_FILE_MASTER_DIR" = "X" ] ; do
|
||||
# echo -e "\n\t\033[33m\033[1mSetting 'Zone File Directory (master)' is required!\033[m\n"
|
||||
# echononl "Zone File Directory (master): "
|
||||
# read ZONE_FILE_MASTER_DIR
|
||||
# done
|
||||
#fi
|
||||
#
|
||||
#echo ""
|
||||
#echo -e "\033[32m--\033[m"
|
||||
#echo ""
|
||||
#echo "Insert the file-suffix of the zone-files"
|
||||
#echo ""
|
||||
#echo ""
|
||||
#ZONE_FILE_SUFFIX=
|
||||
#if [[ -n "$DEFAULT_ZONE_FILE_SUFFIX" ]] ; then
|
||||
# echononl "Suffix of Zone Files [${DEFAULT_ZONE_FILE_SUFFIX}]: "
|
||||
# read ZONE_FILE_SUFFIX
|
||||
# if [[ "X$ZONE_FILE_SUFFIX" = "X" ]]; then
|
||||
# ZONE_FILE_SUFFIX="$DEFAULT_ZONE_FILE_SUFFIX"
|
||||
# fi
|
||||
#else
|
||||
# echononl "Suffix of Zone Files: "
|
||||
# read ZONE_FILE_SUFFIX
|
||||
# while [ "X$ZONE_FILE_SUFFIX" = "X" ] ; do
|
||||
# echo -e "\n\t\033[33m\033[1mSetting 'Suffix of Zone Files' is required!\033[m\n"
|
||||
# echononl "Suffix of Zone Files: "
|
||||
# read ZONE_FILE_SUFFIX
|
||||
# done
|
||||
#fi
|
||||
|
||||
|
||||
echo ""
|
||||
echo -e "\033[32m--\033[m"
|
||||
echo ""
|
||||
@@ -518,30 +465,6 @@ else
|
||||
done
|
||||
fi
|
||||
|
||||
#echo ""
|
||||
#echo -e "\033[32m--\033[m"
|
||||
#
|
||||
#echo ""
|
||||
#echo "Insert the file-suffix of the zone-files"
|
||||
#echo ""
|
||||
#echo ""
|
||||
#ZONE_FILE_SUFFIX=
|
||||
#if [[ -n "$DEFAULT_ZONE_FILE_SUFFIX" ]] ; then
|
||||
# echononl "Suffix of Zone Files [${DEFAULT_ZONE_FILE_SUFFIX}]: "
|
||||
# read ZONE_FILE_SUFFIX
|
||||
# if [[ "X$ZONE_FILE_SUFFIX" = "X" ]]; then
|
||||
# ZONE_FILE_SUFFIX="$DEFAULT_ZONE_FILE_SUFFIX"
|
||||
# fi
|
||||
#else
|
||||
# echononl "Suffix of Zone Files: "
|
||||
# read ZONE_FILE_SUFFIX
|
||||
# while [ "X$ZONE_FILE_SUFFIX" = "X" ] ; do
|
||||
# echo -e "\n\t\033[33m\033[1mSetting 'Suffix of Zone Files' is required!\033[m\n"
|
||||
# echononl "Suffix of Zone Files: "
|
||||
# read ZONE_FILE_SUFFIX
|
||||
# done
|
||||
#fi
|
||||
|
||||
|
||||
clear
|
||||
echo ""
|
||||
@@ -602,36 +525,6 @@ else
|
||||
fatal "$(cat $log_file)"
|
||||
fi
|
||||
|
||||
|
||||
#if $_set_ipv4 ; then
|
||||
# _zone_files_ipv4=`grep -l -e "$IPv4_ADDRESS_OLD" ${ZONE_FILE_MASTER_DIR}/*.$ZONE_FILE_SUFFIX`
|
||||
# if [ ${#zonefiles_arr[@]} -eq 0 ] ; then
|
||||
# for _zone_file in $_zone_files_ipv4 ; do
|
||||
# zonefiles_arr+=("$_zone_file")
|
||||
# done
|
||||
# else
|
||||
# for _zone_file in $_zone_files_ipv4 ; do
|
||||
# containsElement "$_zone_file" "${zonefiles_arr[@]}" && continue
|
||||
# zonefiles_arr+=("$_zone_file")
|
||||
# done
|
||||
# fi
|
||||
#fi
|
||||
#
|
||||
#
|
||||
#if $_set_ipv6 ; then
|
||||
# _zone_files_ipv6=`grep -l -e "$_ipv6_address" ${ZONE_FILE_MASTER_DIR}/*.$ZONE_FILE_SUFFIX`
|
||||
# if [ ${#zonefiles_arr[@]} -eq 0 ] ; then
|
||||
# for _zone_file in $_zone_files_ipv6 ; do
|
||||
# zonefiles_arr+=("$_zone_file")
|
||||
# done
|
||||
# else
|
||||
# for _zone_file in $_zone_files_ipv6 ; do
|
||||
# containsElement "$_zone_file" "${zonefiles_arr[@]}" && continue
|
||||
# zonefiles_arr+=("$_zone_file")
|
||||
# done
|
||||
# fi
|
||||
#fi
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo -e "\033[37m\033[1mDetermine zone files conatining ip-adressse requested for change..\033[m"
|
||||
|
||||
Reference in New Issue
Block a user