Chown auto reply dir to current user

tags/smeserver-expire-accounts-0.1.7-1
Daniel Berteaud 9 years ago
parent 3954a9445f
commit b468604304
  1. 6
      root/etc/e-smith/events/actions/user-update-auto-response

@ -3,6 +3,7 @@
use strict; use strict;
use esmith::AccountsDB; use esmith::AccountsDB;
use esmith::templates; use esmith::templates;
use esmith::util;
use User::pwent; use User::pwent;
my $a = esmith::AccountsDB->open or my $a = esmith::AccountsDB->open or
@ -26,7 +27,10 @@ foreach my $user (@users){
my $userName = $user->key; my $userName = $user->key;
my $home = getpwnam($userName)->dir; my $home = getpwnam($userName)->dir;
mkdir $home . '/.lock-auto-reply' unless -d $home . '/.lock-auto-reply'; unless (-d $home . '/.lock-auto-reply'){
mkdir $home . '/.lock-auto-reply';
esmith::util::chownFile($userName, $userName, $home . '/.lock-auto-reply');
}
esmith::templates::processTemplate ({ esmith::templates::processTemplate ({
MORE_DATA => { USERNAME => $userName }, MORE_DATA => { USERNAME => $userName },

Loading…
Cancel
Save