I tried desperately to install Squint-0.3.18 server on IPCOP 1.4.21 and I encounter some "concerns" with the script squint.cron.sh.
What I do:
1) I unpacks the archive
tar-zxvf squint.tgz
2) I copy and squint.pl squint.cron.sh in / usr / local / bin
squint.pl squint.cron.sh cp / usr / local / bin
3) I created the directory squint in / home / httpd / html /
mkdir squint
4) I publish squint.cron.sh and I change the variables
BASEDIR = / home / httpd / html \
LOGDIR = / var / log / squid \
HTTPDCONF = / etc / httpd / conf / httpd.conf
5) As indicated in the doc I squint launches squint.cron.sh init command to create entries in the Tables cron and a few hives of statements ... and there the trouble begins!
The system sends me a "/ usr / local / bin / squint.cron.sh: line 61: tty: command not found" most ominous!
I decided to edit the file squint.cron.sh and comment out the lines with the function in question:
# If we are not on a tty, then log to file
# tty-s | | {
# Exec> & $ BASEDIR / squint.log
# Date
# Trap "date" EXIT
#}
I raise the squint.cron.sh init command, and there are no errors. I see the creation of directories squint in / home / httpd / html / and all in / home / httpd / html / squint, as well as several files index.html. However, no entry in fcrontab (fcrontab-l), which after verification seems normal because the script squint.cron.sh seeks to modify the crontab file and not fcrontab.
checkcrontab function ()
{
# Install CRONTAB if crontab is writable
CRONTAB = "/ etc / crontab"
[-W $ CRONTAB] | | return
grep-q "squint" $ crontab | |
echo "# squint squid reports
# Weekly on Mondays
00 01 * Monday * root / usr / local / bin / squint.cron.sh weekly
# Monthly, on the first day of the month
00 02 1 * * root / usr / local / bin / monthly squint.cron.sh
# Daily at 3am
00 03 * * * root / usr / local / bin / squint.cron.sh daily ">> $ crontab -1 & & killall crond cron 2> / dev / null
}
Still referring me to the doc (brief) I start to squint squint.cron.sh order to generate all the statements from the squid logs. This time the 'system says a "/ usr / local / bin / squint.cron.sh: line 140: xargs: command not found"
I decided to pass me the script and I squint.cron.sh directly generates the states with the command cat / var / log / squid / access.log |. / Squint.pl / home / httpd / html / squint /.
Everything works so perfectly, the states are generated and accessible via the browser https: / / IPCOP: XXX / squint / index.html. However, I must run this command manually every day and I can not generate reports from acces.log archived files.
I leave it up to you to bring me some help and answer my questions:
Why is my version of IPCOP does not have the command "TTY"? Why is my version of IPCOP does not command "xargs"? How do I change the script so that it modifies squint.cron.sh fcrontab not the crontab? More generally, this version of squint (0.3.18) is it supported by V IPCOP 1.4.21?
Bookmarks