Create .lock-auto-reply with the correct owner

tags/smeserver-expire-accounts-0.1.7-1
Daniel Berteaud 9 years ago
parent 933356c428
commit a3704ba658
  1. 6
      root/etc/e-smith/events/actions/user-expire-account

@ -48,7 +48,11 @@ foreach my $user (@users){
$user->set_prop('ExpireLockedOn', $now->ymd); $user->set_prop('ExpireLockedOn', $now->ymd);
my $home = getpwnam($userName)->dir; my $home = getpwnam($userName)->dir;
mkdir $home . '/.lock-auto-reply' unless -d $home . '/.lock-auto-reply'; if (!-d $home . '/.lock-auto-reply'){
mkdir $home . '/.lock-auto-reply';
chown getpwnam($userName)->uid, getpwnam($userName)->gid, $home . '/.lock-auto-reply';
chmod 750, $home . '/.lock-auto-reply';
}
esmith::templates::processTemplate ({ esmith::templates::processTemplate ({
MORE_DATA => { USERNAME => $userName }, MORE_DATA => { USERNAME => $userName },
TEMPLATE_PATH => "/.lock-auto-reply/message.txt", TEMPLATE_PATH => "/.lock-auto-reply/message.txt",

Loading…
Cancel
Save