Simple Bash Script

I'm sure I'm doing something wrong but as I am new to bash shell scripting I'm not sure what:

Here's the code

webalizer.conf is sitting in the same directory as this file which is named webalizer.sh. Can someone tell me if I've got the syntax right -- it that's correct? I'm executing the file as root with sh ./webalizer.sh. webalizer -c file file executes correctly when I manually insert the variable values. The goal is to get this to run through cron.

Thanks!

Your script assumes webalizer is in the path, it may not be for this script; use the full path. Also that is not the correct way to run a script, in this case it will work becasue you've used bourne syntax, but in general using sh will only work correctly for an sh script, make the script executable and run it directly.

Also since this is a launch script I could consider using "exec" at the start of the last line, once it's launched you only need the webalizer process,not the script.

Yeah I tried adding the paths and not adding the paths. (/bin/date and /usr/bin/webalizer). I changed the file from .sh to just webalizer and made it rwe for user. Either way I get command not found. command not found. command not found. Any suggestions?

I added exec to the last line. Now I get... file cannot be opened on the log. So I chmoded it to 0777 and samething. Ughh! Any suggestions would be great! Of course what ever I work out for cronolog and webalizer will be posted....

Tanks