🔧 Entfernt: Veraltete Skripte für SSL-Fix, Setup und Kiosk-Management zur Verbesserung der Codebasis und Reduzierung von Wartungsaufwand. 🚀
This commit is contained in:
@@ -329,6 +329,33 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Intelligente Kiosk-URL-Konfiguration
|
||||
echo " Konfiguriere intelligente Kiosk-URL..."
|
||||
if [[ -f "$MYP_DIR/systemd/myp-kiosk.service" ]]; then
|
||||
# Intelligent URL detection function direkt in Service einbauen
|
||||
cat > /tmp/url_detect_function << 'EOF'
|
||||
# Intelligente URL-Ermittlung
|
||||
detect_kiosk_url() {
|
||||
# Prioritäten: 1. Intranet-Domain 2. Hostname 3. Localhost
|
||||
if curl -k -s --connect-timeout 2 --max-time 3 "https://m040tbaraspi001.de040.corpintra.net" >/dev/null 2>&1; then
|
||||
echo "https://m040tbaraspi001.de040.corpintra.net"
|
||||
elif curl -k -s --connect-timeout 2 --max-time 3 "https://$(hostname)" >/dev/null 2>&1; then
|
||||
echo "https://$(hostname)"
|
||||
elif curl -k -s --connect-timeout 2 --max-time 3 "https://localhost:443" >/dev/null 2>&1; then
|
||||
echo "https://localhost:443"
|
||||
else
|
||||
echo "https://localhost"
|
||||
fi
|
||||
}
|
||||
TARGET_URL=$(detect_kiosk_url);
|
||||
EOF
|
||||
|
||||
# Ersetze URL-Ermittlung im Kiosk-Service
|
||||
sed -i '/TARGET_URL=.*get_kiosk_url/c\ TARGET_URL=$(detect_kiosk_url);' /etc/systemd/system/myp-kiosk.service 2>/dev/null || true
|
||||
|
||||
echo -e "${GREEN} ✅ Intelligente Kiosk-URL konfiguriert${NC}"
|
||||
fi
|
||||
|
||||
# Kiosk Service starten
|
||||
echo " Starte myp-kiosk..."
|
||||
systemctl start myp-kiosk
|
||||
|
Reference in New Issue
Block a user