Show mDNS hostname alongside IP in RPi scripts
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -53,7 +53,8 @@ echo -e "\033[38;5;93m══════════════\033[38;5;99m═
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
gum style --foreground 245 "This wizard will help you configure your Stegasoo server."
|
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 ""
|
echo ""
|
||||||
|
|
||||||
gum confirm "Ready to begin setup?" || exit 0
|
gum confirm "Ready to begin setup?" || exit 0
|
||||||
@@ -421,8 +422,8 @@ echo -e "\033[38;5;93m══════════════\033[38;5;99m═
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
gum style --foreground 82 --bold "Create your admin account:"
|
gum style --foreground 82 --bold "Create your admin account:"
|
||||||
gum style --foreground 226 " $ACCESS_URL"
|
gum style --foreground 226 " $ACCESS_URL_LOCAL"
|
||||||
gum style --foreground 245 " $ACCESS_URL_LOCAL (if mDNS works)"
|
gum style --foreground 245 " $ACCESS_URL (fallback IP)"
|
||||||
|
|
||||||
if [ -n "$CHANNEL_KEY" ]; then
|
if [ -n "$CHANNEL_KEY" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -316,7 +316,11 @@ echo " User: $PI_USER"
|
|||||||
echo " SSH: enabled"
|
echo " SSH: enabled"
|
||||||
echo " WiFi: $WIFI_SSID"
|
echo " WiFi: $WIFI_SSID"
|
||||||
echo
|
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 we resized, remind about pull-image.sh
|
||||||
if [[ ! "$resize_confirm" =~ ^[Nn]$ ]]; then
|
if [[ ! "$resize_confirm" =~ ^[Nn]$ ]]; then
|
||||||
|
|||||||
10
rpi/setup.sh
10
rpi/setup.sh
@@ -613,15 +613,19 @@ echo -e "${BLUE}-------------------------------------------------------${NC}"
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
PI_IP=$(hostname -I | awk '{print $1}')
|
PI_IP=$(hostname -I | awk '{print $1}')
|
||||||
|
PI_HOST=$(hostname)
|
||||||
|
|
||||||
echo -e "${GREEN}Create your admin account:${NC}"
|
echo -e "${GREEN}Create your admin account:${NC}"
|
||||||
if [ "$ENABLE_HTTPS" = "true" ]; then
|
if [ "$ENABLE_HTTPS" = "true" ]; then
|
||||||
if [ "$USE_PORT_443" = "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}"
|
echo -e " ${YELLOW}https://$PI_IP/setup${NC}"
|
||||||
else
|
else
|
||||||
|
echo -e " ${YELLOW}https://$PI_HOST.local:5000/setup${NC}"
|
||||||
echo -e " ${YELLOW}https://$PI_IP:5000/setup${NC}"
|
echo -e " ${YELLOW}https://$PI_IP:5000/setup${NC}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
echo -e " ${YELLOW}http://$PI_HOST.local:5000/setup${NC}"
|
||||||
echo -e " ${YELLOW}http://$PI_IP:5000/setup${NC}"
|
echo -e " ${YELLOW}http://$PI_IP:5000/setup${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -649,12 +653,12 @@ if [[ ! $REPLY =~ ^[Nn]$ ]]; then
|
|||||||
echo -e "${GREEN}✓ Stegasoo is running!${NC}"
|
echo -e "${GREEN}✓ Stegasoo is running!${NC}"
|
||||||
if [ "$ENABLE_HTTPS" = "true" ]; then
|
if [ "$ENABLE_HTTPS" = "true" ]; then
|
||||||
if [ "$USE_PORT_443" = "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
|
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
|
fi
|
||||||
else
|
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
|
fi
|
||||||
else
|
else
|
||||||
echo -e "${RED}✗ Failed to start. Check logs:${NC} journalctl -u stegasoo -f"
|
echo -e "${RED}✗ Failed to start. Check logs:${NC} journalctl -u stegasoo -f"
|
||||||
|
|||||||
Reference in New Issue
Block a user