Files
eole-proxyworkaround/00-addc-forward_samba_logs

33 lines
998 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
ADDC_PATH="/var/lib/lxc/addc/rootfs"
. /usr/lib/eole/utils.sh
InstallSSLFiles rsyslog_addc syslog syslog "$ADDC_PATH/etc/rsyslog.d/ssl/"
if [ $(CreoleGet samba_log_connexion_authentification_proxy non) == 'oui' ]
then
ca_path=$(CreoleGet samba_log_connexion_ca_chemin)
if [ -f $ca_path ]
then
cat /etc/ssl/certs/ca_local.crt $ca_path > "$ADDC_PATH/etc/ssl/certs/ca_rsyslog.crt"
else
EchoRouge "Le certificat racine pour le pair rsyslog na pas été trouvé"
EchoRouge "Utilisation du mode anonyme"
cp /etc/ssl/certs/ca_local.crt "$ADDC_PATH/etc/ssl/certs/ca_rsyslog.crt"
fi
else
cp /etc/ssl/certs/ca_local.crt "ADDC_PATH/etc/ssl/certs/ca_rsyslog.crt"
fi
if [ ! -e "$ADDC_PATH/var/log/rsyslog/queues" ]
then
mkdir -p "$ADDC_PATH/var/log/rsyslog/queues"
lxc-attach -n addc chown syslog:adm /var/log/rsyslog/queues
fi
lxc-attach -n addc apt install rsyslog-gnutls
lxc-attach -n addc systemctl restart rsyslog
exit 0