«
Anterior
|
Siguiente
»
Revisión b63b33b7
Añadido por Rafael J García hace alrededor de 3 años
- ID b63b33b7177fc140e4ef6c0bf26bd4c2ebd99d8e
- Padre e4037eb7
ubuntu/jammy/all/linex-ubuntu-puppet/debian/postinst | ||
---|---|---|
pidof systemd 2>&1>/dev/null
|
||
|
||
[ -d "/var/lib/puppet/ssl" ] && find /var/lib/puppet/ssl -name $(puppet agent --configprint certname).pem -delete
|
||
curl -k https://$(puppet agent --configprint server):8140/puppet-ca/v1/certificate/ca > $(puppet agent --configprint localcacert)
|
||
|
||
if [ ping -c1 $(puppet agent --configprint server) 2>/dev/null ] ;then
|
||
curl -k https://$(puppet agent --configprint server):8140/puppet-ca/v1/certificate/ca > $(puppet agent --configprint localcacert)
|
||
if [ $? -eq "0" ]; then
|
||
systemctl disable puppet.service
|
||
systemctl enable sincpuppet.service
|
||
fi
|
||
|
||
else
|
||
echo -e 'Servidor no encontrado, no se ha instalado el certificado:\n
|
||
Para instalarlo ejecute:\n
|
||
curl -k https://$(puppet agent --configprint server):8140/puppet-ca/v1/certificate/ca > $(puppet agent --configprint localcacert)'
|
||
exit 0
|
||
fi
|
||
|
||
if [ $? -eq "0" ]; then
|
||
systemctl disable puppet.service
|
||
systemctl enable sincpuppet.service
|
||
fi
|
||
|
||
exit 0
|
||
|
Exportar a: Unified diff
Modificado postinst, con correcciones