On Mon, Mar 25, 2013 at 9:07 PM, Michael Dittmer <
[email protected]> wrote:

> Is there a contrib or script that someone has developed that would at say
> 4am in the morning automatically email a list of the contents of the user
> directories?
>

I've never heard of a specific contrib to do this.  However, it wouldn't be
that difficult to create a little perl or shell script to list the contents
of dirs and email them, then throw it in the cron.daily dir so it would run
daily.  If you wanted to get a little more fancy, you could create an SME
action/event with the script, then throw a shell script in the cron.daily
dir firing the event/action.  I'm more savvy with perl than I am with
shell, so this is how I would do it in perl:

1. Create a hash for the usernames (key) and home dir paths/jail broke
paths (value).

2. Loop (foreach) through the hash created above and:

    a. Store the contents of the dir in an array using glob:
 @array=glob('path_to_home_dir/jail_broke_path');
    b. Email the contents of the dir (@array).  Note:  There are plenty of
code samples in current SME actions for emailing, so you can just go grab
some of that and re-use it.

Greg
_______________________________________________
Discussion about project organisation and overall direction
To unsubscribe, e-mail [email protected]
Searchable archive at http://lists.contribs.org/mailman/public/discussion/

Reply via email to