Files
loustique-home/web_secu/avahi.sh

25 lines
878 B
Bash
Raw Normal View History

2026-03-24 23:56:33 +01:00
#!/bin/bash
cat << 'EOF'
=============================
_______ ________ ___ ___ _______ ________
|\ ___ \ |\ __ \|\ \|\ \|\ ___ \ |\ ____\
\ \ __/|\ \ \|\ \ \ \\\ \ \ __/|\ \ \___|
\ \ \_|/_\ \ ____\ \ __ \ \ \_|/_\ \ \
\ \ \_|\ \ \ \___|\ \ \ \ \ \ \_|\ \ \ \____
\ \_______\ \__\ \ \__\ \__\ \_______\ \_______\
\|_______|\|__| \|__|\|__|\|_______|\|_______|
=============================
EOF
2026-03-25 00:31:32 +01:00
if systemctl is-active --quiet avahi-daemon; then
echo "Avahi est déjà actif accessible via $(hostname).local"
2026-03-24 23:56:33 +01:00
else
2026-03-25 00:31:32 +01:00
if ! dpkg -l avahi-daemon 2>/dev/null | grep -q '^ii'; then
echo "Installation de Avahi..."
apt install -y avahi-daemon
fi
2026-03-24 23:56:33 +01:00
systemctl enable avahi-daemon
systemctl start avahi-daemon
2026-03-25 00:31:32 +01:00
echo "Avahi démarré accessible via $(hostname).local"
2026-03-24 23:56:33 +01:00
fi