Browse Source

Remove postgresql log files

Bob Mottram 7 years ago
parent
commit
f2654245aa
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/freedombone-logging

+ 3
- 0
src/freedombone-logging View File

@@ -96,6 +96,9 @@ function turn_off_postgresql_logging {
96 96
     fi
97 97
     sed -i 's|#log_destination|log_destination|g' /etc/postgresql/9.6/main/postgresql.conf
98 98
     sed -i "s|log_destination.*|log_destination = 'syslog'|g" /etc/postgresql/9.6/main/postgresql.conf
99
+    if [ -d /var/log/postgresql ]; then
100
+        $REMOVE_FILES_COMMAND /var/log/postgresql/*
101
+    fi
99 102
 }
100 103
 
101 104
 function turn_on_postgresql_logging {