Fix warnings and improve setup script execution for dnsmasq installation
This commit is contained in:
@@ -19,7 +19,7 @@ mkdir -p "${BUNDLE_DIR}"
|
||||
# Create local templates.
|
||||
|
||||
if [ -d "${DNSMASQ_SETUP_DIR}" ]; then
|
||||
echo "Warning: ${DNSMASQ_SETUP_DIR}/dnsmasq already exists"
|
||||
echo "Warning: ${DNSMASQ_SETUP_DIR} already exists"
|
||||
read -p "Overwrite? (y/N): " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
@@ -108,7 +108,7 @@ scp -r ${SETUP_DIR}/* root@${SERVER_HOST}:${DESTINATION_DIR}
|
||||
|
||||
# Run setup script on the DNSMasq server.
|
||||
echo "Running setup script on ${SERVER_HOST}..."
|
||||
ssh root@${SERVER_HOST} "bash -s" < "${SETUP_DIR}/setup.sh" || {
|
||||
ssh root@${SERVER_HOST} "cd ${DESTINATION_DIR} && ./setup.sh" || {
|
||||
echo "Error: Failed to run setup script on ${SERVER_HOST}"
|
||||
exit 1
|
||||
}
|
@@ -10,7 +10,7 @@ sudo apt install -y dnsmasq nginx
|
||||
|
||||
DNSMASQ_SETUP_DIR="."
|
||||
PXE_FTPD_DIR="${DNSMASQ_SETUP_DIR}/pxe-ftpd"
|
||||
PXE_WEB_ROOT="${DNSMASQ_SETUP_DIR}/pxe-web"
|
||||
PXE_WEB_ROOT="${DNSMASQ_SETUP_DIR}/ipxe-web"
|
||||
|
||||
# Configure nginx.
|
||||
echo "Configuring nginx."
|
||||
|
@@ -1,4 +1,4 @@
|
||||
!ipxe
|
||||
#!ipxe
|
||||
imgfree
|
||||
kernel http://{{ .cloud.dns.ip }}/amd64/vmlinuz talos.platform=metal console=tty0 init_on_alloc=1 slab_nomerge pti=on consoleblank=0 nvme_core.io_timeout=4294967295 printk.devkmsg=on ima_template=ima-ng ima_appraise=fix ima_hash=sha512 selinux=1 net.ifnames=0
|
||||
initrd http://{{ .cloud.dns.ip }}/amd64/initramfs.xz
|
||||
|
Reference in New Issue
Block a user