diff options
author | Ermal <eri@pfsense.org> | 2010-09-08 17:02:50 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-09-08 17:02:50 +0000 |
commit | 41fb483ad8ebb9aa57a827d2c37d47ce096442f4 (patch) | |
tree | 4eb813ed4a38d511be03a50ba56a09c993bc1a7b /etc | |
parent | e5953c6811f3fce1fa6b9a6b24451d9cb47cdf57 (diff) | |
download | pfsense-41fb483ad8ebb9aa57a827d2c37d47ce096442f4.zip pfsense-41fb483ad8ebb9aa57a827d2c37d47ce096442f4.tar.gz |
Correct typo in file name. Also do not delete users just expire them.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc | 2 | ||||
-rwxr-xr-x | etc/rc.expireaccounts (renamed from etc/rc.exipireaccounts) | 7 |
2 files changed, 5 insertions, 4 deletions
@@ -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.expireaccounts index 7aa9fe5..5058ac5 100755 --- a/etc/rc.exipireaccounts +++ b/etc/rc.expireaccounts @@ -40,7 +40,7 @@ $count = count($config['system']['user']); $index = 0; for(; $index < $count; $index++) { - $user = $config['system']['user'][$index]; + $user =& $config['system']['user'][$index]; if($user['scope'] == "system") continue; echo "1\n"; @@ -49,8 +49,9 @@ continue; echo "1\n"; if(strtotime("-1 day") > strtotime($user['expires'])) { - echo "removing user {$user['name']} at index #{$index}\n"; - unset($config['system']['user'][$index]); + echo "Disabling user {$user['name']} at index #{$index}\n"; + //unset($config['system']['user'][$index]); + $user['disabled'] = true; $removed++; $count--; $index--; |