[OpenWrt-Devel] [PATCH] [package] openvpn: procd_set_param respawn

Lars larsg at systemli.org
Thu Jan 8 10:34:23 EST 2015


From 0c442b23127f58cf4c8c0b96ca67c0335ef86da9 Mon Sep 17 00:00:00 2001
From: Lars Gierth <larsg at systemli.org>
Date: Thu, 8 Jan 2015 16:05:10 +0100
Subject: [PATCH] [package] openvpn: procd_set_param respawn

Makes sure that the openvpn instance gets restarted in case of a crash.

Intentional stops using /etc/init.d/openvpn stop will not result in
respawning. Anything else will, e.g. killall openvpn.

Signed-off-by: Lars Gierth <larsg at systemli.org>
---
 package/network/services/openvpn/files/openvpn.init | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/openvpn/files/openvpn.init
b/package/network/services/openvpn/files/openvpn.init
index 9822f1e..1e0f384 100644
--- a/package/network/services/openvpn/files/openvpn.init
+++ b/package/network/services/openvpn/files/openvpn.init
@@ -62,6 +62,7 @@ openvpn_add_instance() {
 		--cd "$dir" \
 		--config "$conf"
 	procd_set_param file "$dir/$conf"
+	procd_set_param respawn
 	procd_close_instance
 }

-- 
2.1.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x7E86809F.asc
Type: application/pgp-keys
Size: 7893 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150108/c756be6a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150108/c756be6a/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list