Squid log rotate in nano issue.
-
Hi guys.
I had been working with squid, is working good, I just found some issue and found some post that have the same issue with the log rotate.
If I'm wrong please let me know, pfsense by default add a cron job to rotate the files but first one to delete /var/squid/cache/swap.cache (this file doesn't exist in my system) and in the same line it runs the
squid -k rotate
inside /etc/crontab, those are running by root.
Reading post, some one write:
I change the rights to 777 on both files, restart the service and done.
I try this and works.
Now, this is a bug?
How have u guys have done for this issue in nano to rotate your files?
I was thinking in making a batch at start that will change the files rights to 777, them wait for couple of minutes and restart the service.
But my issue is that I have try to use the sleep command in my batch but won't work:
#!/bin/sh cd /var/squid/log/ chmod 777 ./* sleep 120 /usr/local/etc/rc.d/squid.sh restart
If some have a better way to for this I will appreciated any input.
I think we need to do this every time the system restart, because in other post some say that every time a nano restart it create the /var/squid in memory them everything we do will be erase.
Thanks for your time :o
-
I have been trying to understand where to hack squid and fix this issue.
Normally some systems I have I manage them remotely and I need to access the system just to run
./squid.sh restart
I had read squid.inc and try to add the command:
chmod 777 /var/squid/logs/*
But looks like I had not understand the setup process, looks like is all we need to fix the issue of squid in nanobsd and the logs rotation issue.
Home some can show me some light here I will appreciated.
Thanks!!!
-
Hi all
I think this is a issue related to all Squid buid for pfsense!
bc I have the same issue, but my system is running AMD64!