Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logrotate to script log #44

Open
gmoscalu opened this issue Nov 30, 2023 · 1 comment
Open

Add logrotate to script log #44

gmoscalu opened this issue Nov 30, 2023 · 1 comment

Comments

@gmoscalu
Copy link

As the log file grew quite large, i added logrotate:

bash-4.4# cat > DHCP_To_DNS
/var/services/homes/admin/dhcp-dns.log
/var/services/homes/admin/startS99pollDHCP.log {
        size 50M
                weekly
        rotate 60
                copytruncate
                dateext
        missingok
                compress
                postrotate
                    /var/services/homes/admin/S99pollDHCP.sh stop
                        /var/services/homes/admin/S99pollDHCP.sh start
}
bash-4.4# pwd
/usr/local/etc/logrotate.d
bash-4.4#

I suggest to include this in your instructions.

@gclayburg
Copy link
Owner

that's not a bad idea. Perhaps I should check out how big my log file is now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants