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

feat: changed logging and logrotate behavior #79

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/modules/mainsail/filesystem/root/etc/logrotate.d/rsyslog
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/var/log/syslog
{
rotate 4
rotate 2
daily
maxsize 256M
maxsize 128M
missingok
notifempty
delaycompress
Expand All @@ -25,9 +25,9 @@
/var/log/debug
/var/log/messages
{
rotate 4
weekly
maxsize 256M
rotate 2
daily
maxsize 128M
missingok
notifempty
compress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,25 @@ server {

location /webcam/ {
proxy_pass http://mjpgstreamer1/;
access_log off;
error_log off;
}

location /webcam2/ {
proxy_pass http://mjpgstreamer2/;
access_log off;
error_log off;
}

location /webcam3/ {
access_log off;
error_log off;
proxy_pass http://mjpgstreamer3/;
}

location /webcam4/ {
access_log off;
error_log off;
proxy_pass http://mjpgstreamer4/;
}
}
3 changes: 3 additions & 0 deletions src/modules/mainsail/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ apt update && apt install ${MAINSAIL_DEPS} -y
rm /etc/nginx/sites-enabled/default
ln -s /etc/nginx/sites-available/mainsail /etc/nginx/sites-enabled/

# lower nginx rotate cycle to 2 instead 14
sudo sed -i 's/rotate 14/rotate 2/' /etc/logrotate.d/nginx

### Download and Install Mainsail Web Frontend
pushd /home/${BASE_USER}
sudo -u ${BASE_USER} wget -q --show-progress -O mainsail.zip "${MAINSAIL_URL}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

/var/log/webcamd.log
{
rotate 4
rotate 2
weekly
maxsize 64M
maxsize 32M
missingok
notifempty
compress
Expand Down