omit the PHP closing tag at EOF in all PHP files
[racktables] / scripts / cleanup_ldap_cache.php
1 #!/usr/bin/env php
2 <?php
3
4 # This file is a part of RackTables, a datacenter and server room management
5 # framework. See accompanying file "COPYING" for the full copyright and
6 # licensing information.
7
8 // This script purges expired LDAP cache entries from the RackTables database.
9 // This maintenance job is optional and purely cosmetic -- the expired entries
10 // are not valid as far as RackTables authentication is concerned. It used to
11 // be done by RackTables front-end in the past but now you would need to run
12 // this script from a cron job (say, once a day) to achieve the same effect.
13
14 $script_mode = TRUE;
15 require 'inc/init.php';
16
17 if ($user_auth_src == 'ldap')
18 {
19 constructLDAPOptions();
20 discardLDAPCache ($LDAP_options['cache_expiry']);
21 }