mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
basic Out of Box logging + logrotate config for deb based systems
This commit is contained in:
committed by
Dan Christian Bogos
parent
93cb87bece
commit
0305bf40d2
12
data/conf/logging/deb_logrotate.conf
Normal file
12
data/conf/logging/deb_logrotate.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
/var/log/CGRateS.log {
|
||||
daily
|
||||
missingok
|
||||
rotate 31
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
sharedscripts
|
||||
postrotate
|
||||
/usr/lib/rsyslog/rsyslog-rotate
|
||||
endscript
|
||||
}
|
||||
2
data/conf/logging/deb_rsyslog.conf
Normal file
2
data/conf/logging/deb_rsyslog.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
if $programname startswith "CGRateS" or $programname startswith "cgr-engine" then /var/log/CGRateS.log
|
||||
& stop
|
||||
@@ -31,6 +31,10 @@ binary-arch: clean
|
||||
cp $(GOPATH)/bin/cgr-* $(PKGDIR)/usr/bin/
|
||||
mkdir -p $(PKGDIR)/etc/
|
||||
cp -r $(CURDIR)/data/conf/cgrates $(PKGDIR)/etc/
|
||||
mkdir -p $(PKGDIR)/etc/logrotate.d
|
||||
mkdir -p $(PKGDIR)/etc/rsyslog.d
|
||||
cp -r $(CURDIR)/data/conf/logging/deb_logrotate.conf $(PKGDIR)/etc/logrotate.d/CGRateS
|
||||
cp -r $(CURDIR)/data/conf/logging/deb_rsyslog.conf $(PKGDIR)/etc/rsyslog.d/25-CGRateS.conf
|
||||
mkdir -p $(PKGDIR)/usr/share/cgrates
|
||||
cp -r $(CURDIR)/data/* $(PKGDIR)/usr/share/cgrates/
|
||||
tar -xzvf $(PKGDIR)/usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz -C $(PKGDIR)/usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/
|
||||
|
||||
@@ -30,6 +30,10 @@ binary-arch: clean
|
||||
cp $(GOPATH)/bin/cgr-* $(PKGDIR)/usr/bin/
|
||||
mkdir -p $(PKGDIR)/etc/
|
||||
cp -r $(CURDIR)/data/conf/cgrates $(PKGDIR)/etc/
|
||||
mkdir -p $(PKGDIR)/etc/logrotate.d
|
||||
mkdir -p $(PKGDIR)/etc/rsyslog.d
|
||||
cp -r $(CURDIR)/data/conf/logging/deb_logrotate.conf $(PKGDIR)/etc/logrotate.d/CGRateS
|
||||
cp -r $(CURDIR)/data/conf/logging/deb_rsyslog.conf $(PKGDIR)/etc/rsyslog.d/25-CGRateS.conf
|
||||
mkdir -p $(PKGDIR)/usr/share/cgrates
|
||||
cp -r $(CURDIR)/data/* $(PKGDIR)/usr/share/cgrates/
|
||||
tar -xzvf $(PKGDIR)/usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz -C $(PKGDIR)/usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/
|
||||
|
||||
Reference in New Issue
Block a user