浏览代码

Remove postgresql log files

Bob Mottram 7 年前
父节点
当前提交
f2654245aa
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      src/freedombone-logging

+ 3
- 0
src/freedombone-logging 查看文件

96
     fi
96
     fi
97
     sed -i 's|#log_destination|log_destination|g' /etc/postgresql/9.6/main/postgresql.conf
97
     sed -i 's|#log_destination|log_destination|g' /etc/postgresql/9.6/main/postgresql.conf
98
     sed -i "s|log_destination.*|log_destination = 'syslog'|g" /etc/postgresql/9.6/main/postgresql.conf
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
 function turn_on_postgresql_logging {
104
 function turn_on_postgresql_logging {