Przeglądaj źródła

Delete ununsed log files

Bob Mottram 9 lat temu
rodzic
commit
1c6b926631
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3
    0
      src/freedombone-logging

+ 3
- 0
src/freedombone-logging Wyświetl plik

@@ -59,6 +59,7 @@ else
59 59
           sed -i 's|warn_log.*|warn_log off;|g' $filename
60 60
           sed -i 's|error_log.*|error_log off;|g' $filename
61 61
       done
62
+      shred -zu /var/log/nginx/*
62 63
   fi
63 64
   if [ -f /etc/init.d/spamassassin ]; then
64 65
       sed -i 's|DOPTIONS="-d --pidfile=$PIDFILE"|DOPTIONS="-s null -d --pidfile=$PIDFILE"|g' /etc/init.d/spamassassin
@@ -66,6 +67,8 @@ else
66 67
   if [ -d /etc/prosody ]; then
67 68
       sed -i 's|info = "/var/log/prosody/prosody.log";|info = "/dev/null";|g' /etc/prosody/prosody.cfg.lua
68 69
       sed -i 's|error = "/var/log/prosody/prosody.err";|error = "/dev/null";|g' /etc/prosody/prosody.cfg.lua
70
+      shred -zu /var/log/prosody/prosody.log
71
+      shred -zu /var/log/prosody/prosody.err
69 72
   fi
70 73
   if [ -d /etc/exim4 ]; then
71 74
       sed -i 's|log_selector =.*|log_selector = -all|g' /etc/exim4/conf.d/main/90_exim4-config_log_selector