Skip to content
Snippets Groups Projects
Commit ae30e95f authored by ale's avatar ale
Browse files

Clear up some unaccounted process logs

parent 0d352e12
No related branches found
No related tags found
No related merge requests found
MAILTO=""
7 5 * * * root find /var/log/icecast2/ -type f -mtime +7 -delete
/var/log/icecast2/*.log { /var/log/mtail/mtail.log {
daily daily
missingok missingok
rotate 1 rotate 1
postrotate postrotate
if pgrep icecast2 >/dev/null; then if pgrep mtail >/dev/null; then
invoke-rc.d --quiet icecast2 reload > /dev/null invoke-rc.d --quiet mtail restart > /dev/null
fi fi
endscript endscript
compress compress
......
...@@ -18,11 +18,6 @@ ...@@ -18,11 +18,6 @@
- include_tasks: local_install.yml - include_tasks: local_install.yml
when: "source_repository_path is defined" when: "source_repository_path is defined"
- name: Set up icecast logrotate policy
copy:
src: icecast2.logrotate
dest: /etc/logrotate.d/icecast2
- name: Set up icecast static files - name: Set up icecast static files
copy: copy:
src: "icecast/{{ item }}" src: "icecast/{{ item }}"
...@@ -58,6 +53,11 @@ ...@@ -58,6 +53,11 @@
dest: /etc/cron.d/autoradio-backup dest: /etc/cron.d/autoradio-backup
when: "backup_repository is defined" when: "backup_repository is defined"
- name: Setup icecast log clearing cron job
copy:
src: "icecast2.cron"
dest: "/etc/cron.d/icecast2"
- import_tasks: mtail.yml - import_tasks: mtail.yml
- name: Install ip block script - name: Install ip block script
......
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
dest: "/etc/default/mtail" dest: "/etc/default/mtail"
notify: "restart mtail" notify: "restart mtail"
- name: Install mtail logrotate config
copy:
src: "mtail.logrotate"
dest: "/etc/logrotate.d/mtail"
- name: Install mtail programs - name: Install mtail programs
copy: copy:
src: "icecast2.mtail" src: "icecast2.mtail"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment