summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeng Zhuo <mengzhuo1203@gmail.com>2017-01-12 17:06:09 +0800
committerMeng Zhuo <mengzhuo1203@gmail.com>2017-01-12 17:06:09 +0800
commit0d473a6fa73ca73afcc4c9977b9a459a0b925aaa (patch)
tree71ad19546d69cf8f59b9f9afea7b47e975166f84
parent7afceda9cb6352809a0a3123c6aae1234329088b (diff)
downloadgoircd-0d473a6fa73ca73afcc4c9977b9a459a0b925aaa.tar.xz
change log directory
-rw-r--r--GNUmakefile2
-rw-r--r--startup/goircd.service2
-rw-r--r--startup/goircd.service.logrotate10
3 files changed, 12 insertions, 2 deletions
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
+}