testing: Converted sql to systemd

This commit is contained in:
Andreas Steffen
2017-11-11 16:41:15 +01:00
parent 70dc5bb8ad
commit 323f0b05d7
85 changed files with 542 additions and 101 deletions
@@ -1,6 +1,14 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
syslog {
daemon {
default = 1
}
auth {
default = 0
}
}
plugins {
sql {
database = sqlite:///etc/db.d/ipsec.db
@@ -1,6 +1,14 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
syslog {
daemon {
default = 1
}
auth {
default = 0
}
}
plugins {
sql {
database = sqlite:///etc/db.d/ipsec.db
@@ -1,4 +1,4 @@
moon::service charon stop 2> /dev/null
sun::service charon stop 2> /dev/null
moon::systemctl stop strongswan-swanctl
sun::systemctl stop strongswan-swanctl
moon::iptables-restore < /etc/iptables.flush
sun::iptables-restore < /etc/iptables.flush
@@ -2,10 +2,12 @@ moon::cat /usr/local/share/strongswan/templates/database/sql/sqlite.sql /etc/ips
sun::cat /usr/local/share/strongswan/templates/database/sql/sqlite.sql /etc/ipsec.d/data.sql > /etc/db.d/ipsec.sql
moon::cat /etc/db.d/ipsec.sql | sqlite3 /etc/db.d/ipsec.db
sun::cat /etc/db.d/ipsec.sql | sqlite3 /etc/db.d/ipsec.db
moon::cd /etc/swanctl; rm -r rsa/* x509/* x509ca/*
sun::cd /etc/swanctl; rm -r rsa/* x509/* x509ca/*
moon::iptables-restore < /etc/iptables.rules
sun::iptables-restore < /etc/iptables.rules
moon::service charon start 2> /dev/null
sun::service charon start 2> /dev/null
moon::systemctl start strongswan-swanctl
sun::systemctl start strongswan-swanctl
moon::expect-connection net-net
alice::ping -c 1 -W 1 10.2.0.10
bob::ping -c 1 -W 1 10.1.0.20