Added logrotate configuration file (for those who would like one ;))

and changed parameters in sysconfig file so that we use /var/log for
logs and /var/run for pid files.
This commit is contained in:
Martin
2016-05-23 13:30:05 -03:00
parent e53545af4f
commit 3937670d14
2 changed files with 16 additions and 2 deletions

14
RHEL/repmgrd.logrotate Normal file
View File

@@ -0,0 +1,14 @@
/var/log/repmgr/repmgr.log {
missingok
copytruncate
compress
notifempty
sharedscripts
create 0640 postgres postgres
nodateext
weekly
rotate 8
postrotate
/bin/kill -HUP `cat /var/run/repmgr/repmgrd.pid 2>/dev/null` 2> /dev/null || true
endscript
}

View File

@@ -15,7 +15,7 @@ REPMGRD_ENABLED=no
#REPMGRD_BIN=/usr/bin/repmgrd
# pid file
#REPMGRD_PIDFILE=/var/lib/pgsql/repmgr/repmgrd.pid
#REPMGRD_PIDFILE=/var/run/repmgr/repmgrd.pid
# log file
#REPMGRD_LOG=/var/lib/pgsql/repmgr/repmgrd.log
#REPMGRD_LOG=/var/log/repmgr/repmgrd.log