|
|
@ -14,7 +14,7 @@ my $name = $ARGV [1]; |
|
|
|
|
|
|
|
|
|
|
|
die "Event name missing\n" unless (defined $event); |
|
|
|
die "Event name missing\n" unless (defined $event); |
|
|
|
|
|
|
|
|
|
|
|
if ($event eq 'user-create'){ |
|
|
|
if ($event eq 'user-create' and defined $name){ |
|
|
|
mkpath "/home/e-smith/files/scan/$name"; |
|
|
|
mkpath "/home/e-smith/files/scan/$name"; |
|
|
|
system ("$setfacl", |
|
|
|
system ("$setfacl", |
|
|
|
'-m', |
|
|
|
'-m', |
|
|
@ -22,7 +22,7 @@ if ($event eq 'user-create'){ |
|
|
|
'--', |
|
|
|
'--', |
|
|
|
"/home/e-smith/files/scan/$name"); |
|
|
|
"/home/e-smith/files/scan/$name"); |
|
|
|
} |
|
|
|
} |
|
|
|
elsif ($event eq 'user-delete'){ |
|
|
|
elsif ($event eq 'user-delete' and defined $name){ |
|
|
|
rmtree "/home/e-smith/files/scan/$name"; |
|
|
|
rmtree "/home/e-smith/files/scan/$name"; |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|