From 41fb483ad8ebb9aa57a827d2c37d47ce096442f4 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 8 Sep 2010 17:02:50 +0000 Subject: Correct typo in file name. Also do not delete users just expire them. --- etc/rc | 2 +- etc/rc.exipireaccounts | 65 ------------------------------------------------- etc/rc.expireaccounts | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 66 deletions(-) delete mode 100755 etc/rc.exipireaccounts create mode 100755 etc/rc.expireaccounts diff --git a/etc/rc b/etc/rc index 642cc18..aef09c9 100755 --- a/etc/rc +++ b/etc/rc @@ -364,7 +364,7 @@ echo "done." /usr/local/bin/minicron 240 /var/run/ping_hosts.pid /usr/local/bin/ping_hosts.sh # Start account expire handler every hour -/usr/local/bin/minicron 3600 /var/run/expire_accounts.pid /etc/rc.exipireaccounts +/usr/local/bin/minicron 3600 /var/run/expire_accounts.pid /etc/rc.expireaccounts # Start alias url updater every 24 hours /usr/local/bin/minicron 86400 /var/run/update_alias_url_data.pid /etc/rc.update_alias_url_data diff --git a/etc/rc.exipireaccounts b/etc/rc.exipireaccounts deleted file mode 100755 index 7aa9fe5..0000000 --- a/etc/rc.exipireaccounts +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/local/bin/php -f - strtotime($user['expires'])) { - echo "removing user {$user['name']} at index #{$index}\n"; - unset($config['system']['user'][$index]); - $removed++; - $count--; - $index--; - } - } - - if($removed > 0) - write_config("Expired {$removed} user accounts"); - - //print_r($config); - -?> diff --git a/etc/rc.expireaccounts b/etc/rc.expireaccounts new file mode 100755 index 0000000..5058ac5 --- /dev/null +++ b/etc/rc.expireaccounts @@ -0,0 +1,66 @@ +#!/usr/local/bin/php -f + strtotime($user['expires'])) { + echo "Disabling user {$user['name']} at index #{$index}\n"; + //unset($config['system']['user'][$index]); + $user['disabled'] = true; + $removed++; + $count--; + $index--; + } + } + + if($removed > 0) + write_config("Expired {$removed} user accounts"); + + //print_r($config); + +?> -- cgit v1.1