-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Actualizar la lista de paquetes | ||
sudo apt-get update | ||
|
||
# Instalar Avahi y utilidades | ||
sudo apt-get install avahi-daemon avahi-utils -y | ||
|
||
# Verificar si el directorio /etc/avahi/service existe, si no existe, crearlo | ||
if [ ! -d "/etc/avahi/services" ]; then | ||
sudo mkdir -p /etc/avahi/services | ||
fi | ||
|
||
# Añadir el contenido al archivo /etc/avahi/services/ldap.service | ||
sudo tee /etc/avahi/services/ldap.service > /dev/null <<EOF | ||
<?xml version="1.0" standalone='no'?> | ||
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> | ||
<service-group> | ||
<name replace-wildcards="yes">LDAP Server</name> | ||
<service> | ||
<type>_ldap._tcp</type> | ||
<port>389</port> | ||
</service> | ||
</service-group> | ||
EOF | ||
|
||
# Reiniciar el servicio avahi-daemon | ||
sudo systemctl restart avahi-daemon |