diff --git a/sysadmin/le_lan_reload_services.sh b/sysadmin/le_lan_reload_services.sh index 97fb005..5a14afd 100644 --- a/sysadmin/le_lan_reload_services.sh +++ b/sysadmin/le_lan_reload_services.sh @@ -5,25 +5,25 @@ LDAP_SHORTNAME="HOSTNAME" UPDATE_MIKROTIK=0 MIKROTIK_HOST="mikrotik" -# Reload services - -systemctl reload nginx -systemctl restart sssd - # Re-add the private key in LDAP *IMPORTANT* -dsctl "${LDAP_SHORTNAME}" tls import-server-key-cert /etc/letsencrypt/live/"${LE_DOMAIN}"/fullchain.pem \ +/usr/sbin/dsctl "${LDAP_SHORTNAME}" tls import-server-key-cert /etc/letsencrypt/live/"${LE_DOMAIN}"/fullchain.pem \ /etc/letsencrypt/live/"${LE_DOMAIN}"/privkey.pem # Re-import the certificate in the LDAP store -dsconf -v -D "cn=Directory Manager" "${LDAP_SHORTNAME}" security certificate add \ +/usr/sbin/dsconf -v -D "cn=Directory Manager" "${LDAP_SHORTNAME}" security certificate add \ --file /etc/letsencrypt/live/"${LE_DOMAIN}"/cert.pem \ --primary-cert \ --name "LE" systemctl restart dirsrv@${LDAP_SHORTNAME} +# Reload services + +systemctl reload nginx +systemctl restart sssd + # Push the certificates to a Mikrotik AP #NOTE: This assumes you have set up SSH for a user with public key auth