summaryrefslogtreecommitdiff
path: root/user/strongswan/charon.initd
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2018-10-01 01:49:42 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2018-10-01 01:49:42 +0000
commit1cda81aa18e3e257f903d33d7a51bd9b81868db6 (patch)
treec8ef96df52377f9341665890fbee4550145fa22e /user/strongswan/charon.initd
parent9d2575759e27dfb59bd4bb52e6550d0db3e22433 (diff)
parentaa32872d191a1b0704758ed0114b0e670e5eb8be (diff)
downloadpackages-1cda81aa18e3e257f903d33d7a51bd9b81868db6.tar.gz
packages-1cda81aa18e3e257f903d33d7a51bd9b81868db6.tar.bz2
packages-1cda81aa18e3e257f903d33d7a51bd9b81868db6.tar.xz
packages-1cda81aa18e3e257f903d33d7a51bd9b81868db6.zip
Merge branch 'user/strongswan/1' into 'master'
user/strongswan: import from Alpine Imported from Alpine. This package excludes the printf test suite because it was segfaulting. However, that test suite only tests the libc implementations of vsnprintf. All other tests pass. See merge request !69
Diffstat (limited to 'user/strongswan/charon.initd')
-rw-r--r--user/strongswan/charon.initd30
1 files changed, 30 insertions, 0 deletions
diff --git a/user/strongswan/charon.initd b/user/strongswan/charon.initd
new file mode 100644
index 000000000..6f79679c0
--- /dev/null
+++ b/user/strongswan/charon.initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+
+description="strongSwan charon IKE daemon"
+command="/usr/lib/strongswan/charon"
+pidfile="/var/run/charon.pid"
+start_stop_daemon_args="--background"
+extra_started_commands="reload fullstatus"
+
+depend() {
+ need net
+ after firewall
+ provide ipsec
+}
+
+start_post() {
+ ebegin "Loading ${name:-$RC_SVCNAME} configuration"
+ sleep 0.2
+ swanctl --load-all &>/dev/null
+ eend $?
+}
+
+reload() {
+ swanctl --reload-settings
+ swanctl --load-all
+}
+
+fullstatus() {
+ swanctl --list-conns
+ swanctl --list-sas
+}