Skip to content

Commit

Permalink
Modified override file to start logrotate with a custom status file l…
Browse files Browse the repository at this point in the history
…ocation
  • Loading branch information
assrinivasan committed Oct 28, 2024
1 parent 8820c3c commit f9438f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 37 deletions.
2 changes: 0 additions & 2 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,10 @@ echo "system-health.service" | sudo tee -a $GENERATED_SERVICE_FILE
# Copy logrotate.d configuration files
sudo cp -f $IMAGE_CONFIGS/logrotate/logrotate.d/* $FILESYSTEM_ROOT/etc/logrotate.d/
sudo cp $IMAGE_CONFIGS/logrotate/rsyslog.j2 $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES/
sudo cp $IMAGE_CONFIGS/logrotate/logrotate.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
sudo cp $IMAGE_CONFIGS/logrotate/logrotate-config.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
sudo cp $IMAGE_CONFIGS/logrotate/logrotate-config.sh $FILESYSTEM_ROOT/usr/bin/
sudo mkdir -p $FILESYSTEM_ROOT/etc/systemd/system/logrotate.timer.d
sudo cp $IMAGE_CONFIGS/logrotate/timerOverride.conf $FILESYSTEM_ROOT/etc/systemd/system/logrotate.timer.d/
echo "logrotate.service" | sudo tee -a $GENERATED_SERVICE_FILE
echo "logrotate-config.service" | sudo tee -a $GENERATED_SERVICE_FILE

# Copy systemd-journald configuration files
Expand Down
34 changes: 0 additions & 34 deletions files/image_config/logrotate/logrotate.service

This file was deleted.

6 changes: 5 additions & 1 deletion files/image_config/logrotate/logrotateOverride.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[Unit]
Requires=logrotate-config.service
Requires=logrotate-config.service

[Service]
ExecStart=
ExecStart=/usr/sbin/logrotate --state /dev/shm/logrotate/status /etc/logrotate.conf

0 comments on commit f9438f4

Please sign in to comment.