diff options
author | mandree <mandree@FreeBSD.org> | 2010-08-05 03:53:56 +0800 |
---|---|---|
committer | mandree <mandree@FreeBSD.org> | 2010-08-05 03:53:56 +0800 |
commit | 40cf0d3faf96c7fb3e59bf688bb28e5672a2d9dd (patch) | |
tree | 21bc14b34cb962350478c3fb91228cd5eb5b52c1 /security | |
parent | 70cf10146d1fab0bc79db33e19136af1f03509b0 (diff) | |
download | freebsd-ports-gnome-40cf0d3faf96c7fb3e59bf688bb28e5672a2d9dd.tar.gz freebsd-ports-gnome-40cf0d3faf96c7fb3e59bf688bb28e5672a2d9dd.tar.zst freebsd-ports-gnome-40cf0d3faf96c7fb3e59bf688bb28e5672a2d9dd.zip |
Support /etc/rc.d/openvpn softrestart
to send SIGUSR1 (rather than SIGHUP) to OpenVPN processes.
Suggested by: Nick Hibma (in private email)
Diffstat (limited to 'security')
-rw-r--r-- | security/openvpn/Makefile | 2 | ||||
-rw-r--r-- | security/openvpn/files/openvpn.sh.in | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile index efb663981b4e..4e6f76580930 100644 --- a/security/openvpn/Makefile +++ b/security/openvpn/Makefile @@ -7,7 +7,7 @@ PORTNAME= openvpn DISTVERSION= 2.1.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security net # MASTER_SITES points to hosts in distinct data centers, # so just one MASTER_SITES entry should be OK. diff --git a/security/openvpn/files/openvpn.sh.in b/security/openvpn/files/openvpn.sh.in index 050984cdef9c..64f6da0afbe7 100644 --- a/security/openvpn/files/openvpn.sh.in +++ b/security/openvpn/files/openvpn.sh.in @@ -2,10 +2,11 @@ # # openvpn.sh - load tun/tap driver and start OpenVPN daemon # -# (C) Copyright 2005 - 2008 by Matthias Andree +# (C) Copyright 2005 - 2008, 2010 by Matthias Andree # based on suggestions by Matthias Grimm and Dirk Gouders # with multi-instance contribution from Denis Shaposhnikov, Gleb Kozyrev # and Vasil Dimov +# softrestart feature suggested by Nick Hibma # # $FreeBSD$ # @@ -97,8 +98,16 @@ stop_postcmd() rm -f "$pidfile" || warn "Could not remove $pidfile." } -# support SIGHUP to reparse configuration file -extra_commands="reload" +softrestart() +{ + sig_reload=USR1 run_rc_command reload + exit $? +} + +# reload: support SIGHUP to reparse configuration file +# softrestart: support SIGUSR1 to reconnect without superuser privileges +extra_commands="reload softrestart" +softrestart_cmd="softrestart" # pidfile pidfile="/var/run/${name}.pid" |