#!/usr/bin/env miaou-recipe # changes in /etc/sympa/auth.conf if grep -q '.*host 192.168.1.254:389.*' /etc/sympa/auth.conf; then /opt/miaou-bash/tools/append_or_replace '.*host 192.168.1.254:389.*' "\thost 127.0.0.1:3890" /etc/sympa/auth.conf echo 'sympa auth from LDAP local 127.0.0.1:3890 is now active' else echo 'sympa auth from LDAP local 127.0.0.1:3890 already enabled' fi # start SSH port translation if needed if ! ss -tln | grep -q 127.0.0.1:3890; then ssh -fN listes.artcode.re -L 3890:192.168.1.254:389 echo 'SSH port translation 3890 is now active!' systemctl restart wwsympa.socket else echo 'SSH already enabled!' fi