Files
loustique-home/web_secu/avahi.sh

15 lines
415 B
Bash
Raw Normal View History

2026-03-24 23:56:33 +01:00
#!/bin/bash
2026-03-25 00:33:01 +01:00
2026-03-24 23:56:33 +01:00
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