From c95a047516a28b66201b8922475402bc8bda2f88 Mon Sep 17 00:00:00 2001 From: mischa Date: Sat, 6 Oct 2018 15:37:30 +0200 Subject: [PATCH] file creation change install- to -install --- deploy.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/deploy.sh b/deploy.sh index dba0cda..e133278 100755 --- a/deploy.sh +++ b/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