From 0d473a6fa73ca73afcc4c9977b9a459a0b925aaa Mon Sep 17 00:00:00 2001 From: Meng Zhuo Date: Thu, 12 Jan 2017 17:06:09 +0800 Subject: [PATCH] change log directory --- GNUmakefile | 2 +- startup/goircd.service | 2 +- startup/goircd.service.logrotate | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 startup/goircd.service.logrotate diff --git a/GNUmakefile b/GNUmakefile index 2447b91..509c4f8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -7,7 +7,7 @@ include common.mk deb: rm -rf ${BUILD_TMP} mkdir -p ${BUILD_TMP}/usr/local/bin/ - mkdir -p ${BUILD_TMP}/var/lib/goircd/history + mkdir -p ${BUILD_TMP}/var/log/goircd mkdir -p ${BUILD_TMP}/etc/systemd/system/ cp goircd ${BUILD_TMP}/usr/local/bin/ cp startup/goircd.service ${BUILD_TMP}/etc/systemd/system/ diff --git a/startup/goircd.service b/startup/goircd.service index dce0d78..3264700 100644 --- a/startup/goircd.service +++ b/startup/goircd.service @@ -2,7 +2,7 @@ Description=goIRC daemon [Service] -ExecStart=/usr/local/bin/goircd -logdir /var/lib/goircd/history +ExecStart=/usr/local/bin/goircd -logdir /var/log/goircd/ Restart=once RestartSec=3s diff --git a/startup/goircd.service.logrotate b/startup/goircd.service.logrotate new file mode 100644 index 0000000..d6a3caf --- /dev/null +++ b/startup/goircd.service.logrotate @@ -0,0 +1,10 @@ +/var/log/goircd/*.log { + rotate 30 + dateext + daily + delaycompress + missingok + notifempty + + compressoptions -9 +}