diff options
author | Matthias Andree <mandree@FreeBSD.org> | 2010-08-04 19:53:56 +0000 |
---|---|---|
committer | Matthias Andree <mandree@FreeBSD.org> | 2010-08-04 19:53:56 +0000 |
commit | f33f5a90cac5bebc2a125f102e46c11290fba3da (patch) | |
tree | be5173904b9e168c09e4e0de4b258f487b467811 /security/openvpn/files | |
parent | - Update to 0.2.5 (diff) |
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/openvpn/files')
-rw-r--r-- | security/openvpn/files/openvpn.sh.in | 15 |
1 files changed, 12 insertions, 3 deletions
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" |