diff --git a/foreman/altinea_puppet_install.sh b/foreman/altinea_puppet_install.sh index b49058e..5e28f91 100644 --- a/foreman/altinea_puppet_install.sh +++ b/foreman/altinea_puppet_install.sh @@ -1,11 +1,28 @@ #!/bin/sh -apt install -y lsb-release curl && curl -sL -o /var/cache/apt/archives/puppet7-release-`lsb_release -c -s`.deb https://apt.puppet.com/puppet7-release-`lsb_release -c -s`.deb && dpkg -i /var/cache/apt/archives/puppet7-release-`lsb_release -c -s`.deb && apt update && apt install -y puppet-agent && apt clean +apt -qqq install lsb-release curl +if [ `lsb_release -sc` = 'bullseye' ]; then + echo "Bullseye detected, installing repository directly" + echo "# Puppet 7 buster Repository +Types: deb +URIs: http://apt.puppetlabs.com +Suites: bullseye +Components: puppet7 +Signed-By: /usr/share/keyrings/puppet-keyring.gpg" > /etc/apt/sources.list.d/puppet7.sources + curl -o /usr/share/keyrings/puppet-keyring.gpg https://apt.puppet.com/keyring.gpg +else + curl -sL -o /var/cache/apt/archives/puppet7-release-`lsb_release -c -s`.deb https://apt.puppet.com/puppet7-release-`lsb_release -c -s`.deb && dpkg -i /var/cache/apt/archives/puppet7-release-`lsb_release -c -s`.deb +fi +apt -qq update && apt -qqq install puppet-agent && apt clean echo "[agent] server = foreman.altinea.fr runinterval = 600 listen = false pluginsync = true report = true"> /etc/puppetlabs/puppet/puppet.conf +<<<<<<< HEAD /opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true source /etc/profile.d/puppet-agent.sh +======= +/opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true && source /etc/profile.d/puppet-agent.sh +>>>>>>> 9445dfb1bbfede6154b563ce82418b59afa7df80 diff --git a/zimbra/certificat/renew_cert_acmesh_zimbra.sh b/zimbra/certificat/renew_cert_acmesh_zimbra.sh new file mode 100644 index 0000000..22c5118 --- /dev/null +++ b/zimbra/certificat/renew_cert_acmesh_zimbra.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +su zimbra /opt/zimbra/bin/zmproxyctl stop +/root/.acme.sh/acme.sh --issue --standalone -d replace_host +cd /etc/myacme/replace_host/ +mkdir /opt/zimbra/ssl/letsencrypt +echo '-----BEGIN CERTIFICATE----- +MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/ +MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT +DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow +PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD +Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O +rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq +OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b +xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw +7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD +aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV +HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG +SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69 +ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr +AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz +R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5 +JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo +Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ +-----END CERTIFICATE-----' >> fullchain.cer +cp /etc/myacme/replace_host/* /opt/zimbra/ssl/letsencrypt/ +chown zimbra:zimbra /opt/zimbra/ssl/letsencrypt/* +chown zimbra:zimbra /opt/zimbra/ssl/letsencrypt/ +cp -a /opt/zimbra/ssl/zimbra /opt/zimbra/ssl/zimbra.$(date "+%Y%m%d") +cp /opt/zimbra/ssl/letsencrypt/replace_host.key /opt/zimbra/ssl/zimbra/commercial/commercial.key +su - zimbra -c " +cd /opt/zimbra/ssl/letsencrypt/ +/opt/zimbra/bin/zmcertmgr verifycrt comm replace_host.key replace_host.cer fullchain.cer +/opt/zimbra/bin/zmcertmgr deploycrt comm replace_host.cer fullchain.cer +zmcontrol restart"