From ae47ff4932459674084778b4708d6873d06fcefa Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Tue, 6 Jan 2026 21:52:51 -0500 Subject: [PATCH] Show mDNS hostname alongside IP in RPi scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - flash-stock-img.sh: Show stegasoo.local URL and SSH command - setup.sh: Display both .local and IP URLs - first-boot-wizard.sh: Prioritize .local URL, IP as fallback - Clean up service file path display 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- rpi/first-boot-wizard.sh | 7 ++++--- rpi/flash-stock-img.sh | 6 +++++- rpi/setup.sh | 10 +++++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/rpi/first-boot-wizard.sh b/rpi/first-boot-wizard.sh index edb9bda..08adb8b 100755 --- a/rpi/first-boot-wizard.sh +++ b/rpi/first-boot-wizard.sh @@ -53,7 +53,8 @@ echo -e "\033[38;5;93m══════════════\033[38;5;99m═ echo "" gum style --foreground 245 "This wizard will help you configure your Stegasoo server." -gum style --foreground 245 "You can reconfigure later by editing /etc/systemd/system/stegasoo.service" +gum style --foreground 245 "You can reconfigure later by editing:" +gum style --foreground 245 " /etc/systemd/system/stegasoo.service" echo "" gum confirm "Ready to begin setup?" || exit 0 @@ -421,8 +422,8 @@ echo -e "\033[38;5;93m══════════════\033[38;5;99m═ echo "" gum style --foreground 82 --bold "Create your admin account:" -gum style --foreground 226 " $ACCESS_URL" -gum style --foreground 245 " $ACCESS_URL_LOCAL (if mDNS works)" +gum style --foreground 226 " $ACCESS_URL_LOCAL" +gum style --foreground 245 " $ACCESS_URL (fallback IP)" if [ -n "$CHANNEL_KEY" ]; then echo "" diff --git a/rpi/flash-stock-img.sh b/rpi/flash-stock-img.sh index 942e0c6..9ed3a81 100755 --- a/rpi/flash-stock-img.sh +++ b/rpi/flash-stock-img.sh @@ -316,7 +316,11 @@ echo " User: $PI_USER" echo " SSH: enabled" echo " WiFi: $WIFI_SSID" echo -echo "Insert into Pi and boot. Find it with: ping $PI_HOSTNAME.local" +echo "Insert into Pi and boot. Access via:" +echo " mDNS: http://$PI_HOSTNAME.local" +echo " Find IP: ping $PI_HOSTNAME.local" +echo +echo "Once booted, SSH with: ssh $PI_USER@$PI_HOSTNAME.local" # If we resized, remind about pull-image.sh if [[ ! "$resize_confirm" =~ ^[Nn]$ ]]; then diff --git a/rpi/setup.sh b/rpi/setup.sh index 93d67c7..503ec60 100755 --- a/rpi/setup.sh +++ b/rpi/setup.sh @@ -613,15 +613,19 @@ echo -e "${BLUE}-------------------------------------------------------${NC}" echo "" PI_IP=$(hostname -I | awk '{print $1}') +PI_HOST=$(hostname) echo -e "${GREEN}Create your admin account:${NC}" if [ "$ENABLE_HTTPS" = "true" ]; then if [ "$USE_PORT_443" = "true" ]; then + echo -e " ${YELLOW}https://$PI_HOST.local/setup${NC}" echo -e " ${YELLOW}https://$PI_IP/setup${NC}" else + echo -e " ${YELLOW}https://$PI_HOST.local:5000/setup${NC}" echo -e " ${YELLOW}https://$PI_IP:5000/setup${NC}" fi else + echo -e " ${YELLOW}http://$PI_HOST.local:5000/setup${NC}" echo -e " ${YELLOW}http://$PI_IP:5000/setup${NC}" fi @@ -649,12 +653,12 @@ if [[ ! $REPLY =~ ^[Nn]$ ]]; then echo -e "${GREEN}✓ Stegasoo is running!${NC}" if [ "$ENABLE_HTTPS" = "true" ]; then if [ "$USE_PORT_443" = "true" ]; then - echo -e " Create admin: ${YELLOW}https://$PI_IP/setup${NC}" + echo -e " Create admin: ${YELLOW}https://$PI_HOST.local/setup${NC} or ${YELLOW}https://$PI_IP/setup${NC}" else - echo -e " Create admin: ${YELLOW}https://$PI_IP:5000/setup${NC}" + echo -e " Create admin: ${YELLOW}https://$PI_HOST.local:5000/setup${NC} or ${YELLOW}https://$PI_IP:5000/setup${NC}" fi else - echo -e " Create admin: ${YELLOW}http://$PI_IP:5000/setup${NC}" + echo -e " Create admin: ${YELLOW}http://$PI_HOST.local:5000/setup${NC} or ${YELLOW}http://$PI_IP:5000/setup${NC}" fi else echo -e "${RED}✗ Failed to start. Check logs:${NC} journalctl -u stegasoo -f"