|
From: <abe...@us...> - 2016-12-15 17:48:44
|
Revision: 8036
http://sourceforge.net/p/astlinux/code/8036
Author: abelbeck
Date: 2016-12-15 17:48:42 +0000 (Thu, 15 Dec 2016)
Log Message:
-----------
strongswan, move most logs to '/var/log/charon.log' instead of syslog, and rotate the log file
Modified Paths:
--------------
branches/1.0/package/strongswan/strongswan.mk
Added Paths:
-----------
branches/1.0/package/strongswan/charon-logging.conf
branches/1.0/package/strongswan/charon.logrotate
Added: branches/1.0/package/strongswan/charon-logging.conf
===================================================================
--- branches/1.0/package/strongswan/charon-logging.conf (rev 0)
+++ branches/1.0/package/strongswan/charon-logging.conf 2016-12-15 17:48:42 UTC (rev 8036)
@@ -0,0 +1,27 @@
+charon {
+ filelog {
+ /var/log/charon.log {
+ # add a timestamp prefix
+ time_format = %b %e %T
+ # prepend connection name
+ ike_name = yes
+ # overwrite existing files
+ append = no
+ # default loglevel for all daemon subsystems
+ default = 1
+ # flush each line to disk
+ flush_line = yes
+ }
+ }
+ syslog {
+ # use 'silent' settings to log to the LOG_DAEMON facility
+ daemon {
+ default = -1
+ }
+ # use 'silent' settings to log to the LOG_AUTHPRIV facility
+ auth {
+ default = -1
+ }
+ }
+}
+
Added: branches/1.0/package/strongswan/charon.logrotate
===================================================================
--- branches/1.0/package/strongswan/charon.logrotate (rev 0)
+++ branches/1.0/package/strongswan/charon.logrotate 2016-12-15 17:48:42 UTC (rev 8036)
@@ -0,0 +1,13 @@
+#
+/var/log/charon.log {
+ missingok
+ size 100k
+ rotate 1
+ sharedscripts
+ postrotate
+ if [ -f /var/run/charon.pid ]; then
+ /bin/kill -HUP $(cat /var/run/charon.pid) >/dev/null 2>&1
+ fi
+ endscript
+}
+
Modified: branches/1.0/package/strongswan/strongswan.mk
===================================================================
--- branches/1.0/package/strongswan/strongswan.mk 2016-12-14 14:17:11 UTC (rev 8035)
+++ branches/1.0/package/strongswan/strongswan.mk 2016-12-15 17:48:42 UTC (rev 8036)
@@ -75,7 +75,9 @@
ln -s /tmp/etc/strongswan/$$i $(TARGET_DIR)/etc/$$i ; \
done
rm -rf $(TARGET_DIR)/usr/share/strongswan
- $(INSTALL) -m 0755 -D package/strongswan/ipsec.init $(TARGET_DIR)/etc/init.d/ipsec
+ $(INSTALL) -m 755 -D package/strongswan/ipsec.init $(TARGET_DIR)/etc/init.d/ipsec
+ $(INSTALL) -m 644 -D package/strongswan/charon.logrotate $(TARGET_DIR)/etc/logrotate.d/charon
+ $(INSTALL) -m 644 -D package/strongswan/charon-logging.conf $(TARGET_DIR)/stat/etc/strongswan/strongswan.d/charon-logging.conf
ln -sf ../../init.d/ipsec $(TARGET_DIR)/etc/runlevels/default/S31ipsec
ln -sf ../../init.d/ipsec $(TARGET_DIR)/etc/runlevels/default/K20ipsec
endef
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|