Re: webalizer question (self-moving directories)
- --- In firstname.lastname@example.org, "t_stangel@y..." <t_stangel@y...>
> hey there,webalizer at all but that is where the problem seems to be comming
> i have a very unusual problem with webalizer. well im not sure its
from. every week or so, one of my hostees stats directory gets renamed
from "stats/" to "etc/". then the cron daemon goes nuts and emails me
about it. it only gets more confusing when the stats directory is
still there but its empty.
>script which processes them all every hour in the cron.hourly
> each one of my hostees have separate logs so i have a simple perl
directory. the system is redhat 8 and it has only happened to one
hostee. thanks for the help in advance!
You perhaps have some script in cron.weekly which is moving that
directory? Could you copy/paste the cron email text and a "ls -ld" and
a "ls -l" of both directories right after the problem appears, just to
check ownerships and timestamps? Also the crontab line for cron.
weekly, and a "ls" of /etc/cron.weekly to check if the directories
were created around the time a particular script is running.
In any case, you may use a very ugly "patch" to solve the problem by
adding these lines in the webalizer script before running webalizer.
(ejem, I just remembered that you use perl, not bash, just translate
adequately to perl)
cp -rf $PROBLEMATIC_DIR/etc/* $PROBLEMATIC_DIR/stats/
This will copy all files in "etc/" to "stats/". Notice that files in
"stats/" holding the same name as some other file in "etc/" will get
NOTE: Notice that "dir/etc" is the same as "dir//etc". I just add "/"
to end of all paths just to be sure that I don't forget later to add
it, so I get many times paths like "/home//user//stats/dir". It will
(in my system) work with no problems.
ah okay. i thought about doing that in perl with a if statement but i am just so baffled at why it might be doing this. i will post all of that once it happens again. thanks!
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.