Fix warnings and improve setup script execution for dnsmasq installation

This commit is contained in:
2025-06-27 06:53:01 -07:00
parent 2def62e218
commit d1ea7ea998
3 changed files with 4 additions and 4 deletions

View File

@@ -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
}