Skip to content

Commit

Permalink
Create im_your_ldapserver.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrl39 authored May 31, 2024
1 parent 3a182d5 commit 0c9a729
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/scripts/im_your_ldapserver.sh
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

0 comments on commit 0c9a729

Please sign in to comment.