From 8c289c6d6e689591f71a8af862bc54d07bacadcf Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Sun, 29 Oct 2017 20:16:18 +0900 Subject: [PATCH] update logrotate and newsyslog following previous modification --- configure.ac | 3 +++ support/Makefile.am | 2 +- support/logrotate/Makefile.am | 4 ++++ support/logrotate/nextepc.in | 4 ++-- support/newsyslog/Makefile.am | 4 ++++ support/newsyslog/nextepc.conf.in | 12 ++++++------ support/systemd/Makefile.am | 10 ++++++++++ 7 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 support/logrotate/Makefile.am create mode 100644 support/newsyslog/Makefile.am create mode 100644 support/systemd/Makefile.am diff --git a/configure.ac b/configure.ac index 836e88fa7..0d3d54ab4 100644 --- a/configure.ac +++ b/configure.ac @@ -474,8 +474,11 @@ AC_CONFIG_FILES([support/systemd/nextepc-sgwd.service]) AC_CONFIG_FILES([support/systemd/nextepc-pgwd.service]) AC_CONFIG_FILES([support/systemd/nextepc-hssd.service]) AC_CONFIG_FILES([support/systemd/nextepc-pcrfd.service]) +AC_CONFIG_FILES([support/systemd/Makefile]) AC_CONFIG_FILES([support/logrotate/nextepc]) +AC_CONFIG_FILES([support/logrotate/Makefile]) AC_CONFIG_FILES([support/newsyslog/nextepc.conf]) +AC_CONFIG_FILES([support/newsyslog/Makefile]) AC_CONFIG_FILES([support/Makefile]) AC_CONFIG_FILES([test/Makefile]) AC_CONFIG_FILES([Makefile]) diff --git a/support/Makefile.am b/support/Makefile.am index 13a024ee1..05fec572e 100644 --- a/support/Makefile.am +++ b/support/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = config freeDiameter +SUBDIRS = config freeDiameter systemd logrotate newsyslog MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump diff --git a/support/logrotate/Makefile.am b/support/logrotate/Makefile.am new file mode 100644 index 000000000..1030be101 --- /dev/null +++ b/support/logrotate/Makefile.am @@ -0,0 +1,4 @@ +EXTRA_DIST = nextepc.in + +MAINTAINERCLEANFILES = Makefile.in +MOSTLYCLEANFILES = *.stackdump diff --git a/support/logrotate/nextepc.in b/support/logrotate/nextepc.in index fd619cb3a..d58a86504 100644 --- a/support/logrotate/nextepc.in +++ b/support/logrotate/nextepc.in @@ -8,8 +8,8 @@ postrotate for i in pcrfd pgwd sgwd hssd mmed epcd; do - if [ -e @LOCALSTATE_DIR@/run/nextepc/$i.pid ] ; then - kill -HUP `cat @LOCALSTATE_DIR@/run/nextepc/$i.pid` + if [ -e @LOCALSTATE_DIR@/run/nextepc-$i/pid ] ; then + kill -HUP `cat @LOCALSTATE_DIR@/run/nextepc-$i/pid` fi done endscript diff --git a/support/newsyslog/Makefile.am b/support/newsyslog/Makefile.am new file mode 100644 index 000000000..35733477a --- /dev/null +++ b/support/newsyslog/Makefile.am @@ -0,0 +1,4 @@ +EXTRA_DIST = nextepc.conf.in + +MAINTAINERCLEANFILES = Makefile.in +MOSTLYCLEANFILES = *.stackdump diff --git a/support/newsyslog/nextepc.conf.in b/support/newsyslog/nextepc.conf.in index 37f05b123..ad6badb3f 100644 --- a/support/newsyslog/nextepc.conf.in +++ b/support/newsyslog/nextepc.conf.in @@ -1,9 +1,9 @@ # truncate rails logs every day at midnight, keep 14 previous logs, compress previous logs # # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] -@LOCALSTATE_DIR@/log/nextepc/pcrfd.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc/pcrfd.pid` -@LOCALSTATE_DIR@/log/nextepc/pgwd.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc/pcrfd.pid` -@LOCALSTATE_DIR@/log/nextepc/sgwd.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc/sgwd.pid` -@LOCALSTATE_DIR@/log/nextepc/hssd.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc/hssd.pid` -@LOCALSTATE_DIR@/log/nextepc/mmed.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc/mmed.pid` -@LOCALSTATE_DIR@/log/nextepc/nextepc.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc/epcd.pid` +@LOCALSTATE_DIR@/log/nextepc/pcrf.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-pcrfd/pid` +@LOCALSTATE_DIR@/log/nextepc/pgw.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-pgwd/pid` +@LOCALSTATE_DIR@/log/nextepc/sgw.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-sgwd/pid` +@LOCALSTATE_DIR@/log/nextepc/hss.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-hssd/pid` +@LOCALSTATE_DIR@/log/nextepc/mme.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-mmed/pid` +@LOCALSTATE_DIR@/log/nextepc/nextepc.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-epcd/pid` diff --git a/support/systemd/Makefile.am b/support/systemd/Makefile.am new file mode 100644 index 000000000..1800791ea --- /dev/null +++ b/support/systemd/Makefile.am @@ -0,0 +1,10 @@ +EXTRA_DIST = \ + nextepc-mmed.service.in \ + nextepc-pgwd.service.in \ + nextepc-hssd.service.in \ + nextepc-pcrfd.service.in \ + nextepc-sgwd.service.in \ + $(NULL) + +MAINTAINERCLEANFILES = Makefile.in +MOSTLYCLEANFILES = *.stackdump