ipsec-tools: Use procd in racoon's init script

Signed-off-by: Noah Meyerhans <frodo@morgul.net>
This commit is contained in:
Noah Meyerhans 2014-12-06 08:50:37 -08:00
parent d3d3f1e57b
commit 0230141e17

View file

@ -1,17 +1,17 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2009-2011 OpenWrt.org # Copyright (C) 2009-2011 OpenWrt.org
# Copyright (C) 2011 Artem Makhutov # Copyright (C) 2011 Artem Makhutov
# Copyright (C) 2014 Noah Meyerhans <frodo@morgul.net>
USE_PROCD=1
START=49 START=49
SERVICE_USE_PID=1 start_service() {
start() {
mkdir -m 0700 -p /var/racoon mkdir -m 0700 -p /var/racoon
[ -f /etc/ipsec.conf ] && /usr/sbin/setkey -f /etc/ipsec.conf [ -f /etc/ipsec.conf ] && /usr/sbin/setkey -f /etc/ipsec.conf
service_start /usr/sbin/racoon -f /etc/racoon.conf procd_open_instance
} procd_set_param command /usr/sbin/racoon -F -f /etc/racoon/racoon.conf -l /var/log/racoon
procd_set_param respawn
stop() { procd_close_instance
service_stop /usr/sbin/racoon
} }