Browse Source

Add cronjob authentik LDAP sync script

master
Akshay 7 months ago
parent
commit
fdfa1577f3
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      authentik_install.sh

+ 9
- 0
authentik_install.sh View File

@ -38,3 +38,12 @@ fi
${SUDO} docker-compose pull
${SUDO} docker-compose up
# Create cronjob to sync deleted users from LDAP
${SUDO} mkdir /usr/local/src/authentik_ldap_sync
${SUDO} cp authentik_deleted_user_sync.sh /usr/local/src/authentik_ldap_sync
if [ ! -f "/var/spool/cron/crontabs/root" ]; then
${SUDO} echo "0 0 */7 * * /usr/local/src/authentik_ldap_sync/authentik_deleted_user_sync.sh" > /var/spool/cron/crontabs/root
else
${SUDO} echo "0 0 */7 * * /usr/local/src/authentik_ldap_sync/authentik_deleted_user_sync.sh" >> /var/spool/cron/crontabs/root
fi

Loading…
Cancel
Save