diff options
author | 2011-03-10 10:24:33 +0000 | |
---|---|---|
committer | 2011-03-10 10:24:33 +0000 | |
commit | 26c8daedbaf3c61286d2b9af2488666eaa2064fc (patch) | |
tree | 7495947e80865db64fc52cfbd2cabae8bcf87501 | |
parent | Add a small comment at the top to explain what this file does. (diff) | |
download | wireguard-openbsd-26c8daedbaf3c61286d2b9af2488666eaa2064fc.tar.xz wireguard-openbsd-26c8daedbaf3c61286d2b9af2488666eaa2064fc.zip |
Extend the documentation of the actions argument and bring this up to date
after the recent changes.
ok sthen@ robert@
-rw-r--r-- | share/man/man8/rc.subr.8 | 72 |
1 files changed, 55 insertions, 17 deletions
diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index 795c207c62a..247c338b935 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rc.subr.8,v 1.11 2011/03/08 13:49:13 ajacoutot Exp $ +.\" $OpenBSD: rc.subr.8,v 1.12 2011/03/10 10:24:33 ajacoutot Exp $ .\" .\" Copyright (c) 2011 Robert Nagy, Antoine Jacoutot, Ingo Schwarze .\" All rights reserved. @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: March 8 2011 $ +.Dd $Mdocdate: March 10 2011 $ .Dt RC.SUBR 8 .Os .Sh NAME @@ -128,21 +128,63 @@ argument can be .Cm reload , .Cm restart , or -.Cm check , -each running one of the functions described below. -.It Ic rc_start -Check whether the service is already running by calling -.Ar rc_check , +.Cm check : +.Bl -tag -width restart +.It Ic check +Call +.Fn rc_check . +Return 0 if the daemon is running or 1 if it is not. +.It Ic start +Check that the service is running by calling +.Fn rc_check , If it's not running, call .Fn rc_pre -if it exists, then start the daemon. -.It Ic rc_stop +if it exists, then +.Fn rc_start . +.It Ic stop Check that the service is running by calling -.Ar rc_check . -If it is running, stop the daemon, -then call +.Fn rc_check . +If it is running, +call +.Fn rc_stop +and wait up to 5 seconds for the daemon to properly shutdown. +If successful, run .Fn rc_post if it exists. +.It Ic restart +Run the +.Ar action +agument +.Cm stop , +then if successful run +.Cm start . +.It Ic reload +Check that the service is running by calling +.Fn rc_check . +If it is running, +call +.Fn rc_reload . +.El +.It Ic rc_check +Send a +.Dv NULL +signal using +.Xr pkill 1 +on the regular expression given in the +.Ar pexp +variable. +.It Ic rc_start +Start the daemon. Defaults to +.Va ${rcexec} "${daemon} ${daemon_flags} ${_bg}" . +.It Ic rc_stop +Stop the daemon. +Send a +.Dv SIGKILL +signal using +.Xr pkill 1 +on the regular expression given in the +.Ar pexp +variable. .It Ic rc_reload Send a .Dv SIGHUP @@ -154,9 +196,7 @@ variable. One has to make sure that sending .Dv SIGHUP to a daemon will have the desired effect, -that is, that it will reload its configuration. -.It Ic rc_check -Return 0 if the daemon is running or 1 if it is not. +i.e. that it will reload its configuration. .El .Sh ENVIRONMENT .Ic rc_cmd @@ -189,8 +229,6 @@ script itself and uses that. If no such login class exists then daemon will be used. .It Va pexp A regular expression to be passed to -.Xr pgrep 1 -or .Xr pkill 1 in order to find the desired process. By default this variable contains the |