commit c95a047516a28b66201b8922475402bc8bda2f88 from: mischa date: Sat Oct 06 13:37:30 2018 UTC file creation change install- to -install commit - 40fd893bfba7781195ae41c6bdb43f4aedcb1c4e commit + c95a047516a28b66201b8922475402bc8bda2f88 blob - dba0cda022570f13199ae7b5405c5e3ab260227c blob + e1332780f6234ae0970d59e81462c2e54cd69a3e --- deploy.sh +++ deploy.sh @@ -4,7 +4,7 @@ # shellcheck disable=SC2154 # CONF_FILE "_vms.conf" needs to have the following variables: -## Server config for install-.conf +## Server config for -install.conf #SERVER="server1" #DOMAIN="example.com" ## IP / MAC config @@ -109,7 +109,7 @@ fetch_ipv6() { } generate_passwd() { - # Generate a random password for the install-.conf file. + # Generate a random password for the -install.conf file. # Doesn't take variables #tr -cd '[:alnum:]' < /dev/urandom | fold -w 20 | head -n 1 jot -rcs '' 20 33 126 @@ -216,10 +216,10 @@ render_dhcpd_conf() { } render_install_conf() { - # Generate install-.comf + # Generate -install.comf # Takes defaults from of _vms.conf and iterate over the vm*.txt files. - # When the VM image doesn't exist create the install-.conf file. - # When the VM image does exist remove the install-.conf file. + # When the VM image doesn't exist create the -install.conf file. + # When the VM image does exist remove the -install.conf file. # fetch_ipv6() to get the correct IPv6 address of the VM. # fetch_mac() to get the correct MAC address of the VM. while read -r f @@ -232,7 +232,7 @@ render_install_conf() { _mac=$(fetch_mac "$MAC_PREFIX" "$(find_vm "$VMS" "$_instance")") if ! test -f "${IMAGES}/${_instance}.img" then - cat <<-EOF > "${HTDOCS}/install-${_mac}.conf" + cat <<-EOF > "${HTDOCS}/${_mac}-install.conf" # # File generated on $date # @@ -254,10 +254,10 @@ render_install_conf() { Continue anyway = yes Continue without verification = yes EOF - echo "Install file created: ${HTDOCS}/install-${_mac}.conf" + echo "Install file created: ${HTDOCS}/${_mac}-install.conf" else - if test -f "${HTDOCS}/install-${_mac}.conf" - then rm -rf "${HTDOCS}/install-${_mac}.conf" + if test -f "${HTDOCS}/${_mac}-install.conf" + then rm -rf "${HTDOCS}/${_mac}-install.conf" fi fi clear_variables