Commit Graph

41 Commits

Author SHA1 Message Date
William Hubbs
e6d01471fe start-stop-daemon: add ability to log stdout or stderr to processes 2018-06-15 12:23:50 -05:00
Austin English
6edf516a1f sh/supervise-daemon.sh: use start_stop_daemon_args if supervise_daemon_args is undefined 2018-05-30 12:11:10 -04:00
William Hubbs
49a90f27a8 typo fix 2018-04-24 10:40:57 -05:00
Michael Orlitzky
c1ffe4d9f2 man/openrc-run.8: fix mountinfo args.
The "Ar" tag for the mountinfo command contained a typo (leading
space) that resulted in the tag being output verbatim; that is,

  mountinfo ... .Ar mount1 mount2

rather than e.g.

  mountinfo ... <mount1> <mount2>

This commit deletes the leading space to fix the output.

This fixes #204.
2018-02-06 13:53:11 -06:00
Michael Orlitzky
4c517bdb2b man/openrc-run.8: add missing "Xo" tags for fstabinfo and mountinfo.
The BUILTINS are all surrounded by Xo...Xc tags, but the opening "Xo"
was missing from the two commands fstabinfo and mountinfo. This commit
adds them, and thereby fixes the spacing when viewed by man.

This is for #204.
2018-02-06 13:52:36 -06:00
William Hubbs
0feadd2922 man/openrc-run.8: update documentation for command_user 2017-11-30 16:00:42 -06:00
Julien Reichardt
f012930775 man/openrc-run.8: remove white space
This is for #184.
2017-11-29 15:06:06 -06:00
Julien Reichardt
ddbdb69658 add more variables for start-stop-daemon and supervise-daemon options
Add the following variables to expose more arguments that can be passed
to start-stop-daemon or supervise-daemon:

- directory will be passed to --chdir
- error_log will be passed to --stderr
- output_log will be passed to --stdout
- umask will be passed to umask

This is for #184.
2017-11-29 15:06:06 -06:00
William Hubbs
e805c74d31 s6 supervisor fixes
Add the ability to force-kill a service if it does not go down
successfully. Also, adjust the default wait time for an s6 service to go
down to 60 seconds.
2017-11-16 15:35:35 -06:00
William Hubbs
c46adf1434 man/openrc-run.8: Clarify the explanation of the need dependency 2017-09-22 16:24:20 -05:00
William Hubbs
c2d256bafb man/openrc-run.8: document fstabinfo and mountinfo
X-Gentoo-Bug: 592374
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=592374
2017-07-26 11:31:34 -05:00
William Hubbs
f48d9c33a5 man/openrc-run.8: document _pre and _post functions
Fixes https://github.com/openrc/openrc/issues/155.
2017-07-25 13:54:12 -05:00
Adam Borowski
260368e010 man: fix missing .Pp warnings
This fixes #151.
2017-07-07 17:13:40 -05:00
William Hubbs
4c89e3f5fa supervise-daemon:create multiple options from --respawn-limit
This creates --respawn-delay, --respawn-max and --respawn-period. It was
suggested that it would be easier to follow if the options were
separated.

This is for #126.
2017-05-10 18:13:23 -05:00
William Hubbs
3673040722 supervise-daemon: add a --respawn-limit option
Allow limiting the number of times supervise-daemon will attempt to respawn a
daemon once it has died to prevent infinite respawning. Also, set a
reasonable default limit (10 times in a 5 second period).

This is for issue #126.
2017-05-09 18:30:08 -05:00
AndCycle
42cb848829 fix manual typo
This fixes #105.
2016-12-02 10:57:10 -06:00
William Hubbs
316903fbf0 man/openrc-run.8: typo fix 2016-09-22 10:30:41 -05:00
William Hubbs
66a9788435 man/openrc-run.8: Add note about eval usage
This fixes #77.
2016-09-21 13:33:39 -05:00
William Hubbs
c146b96691 Add command_progress variable
If this is set to yes, 1, true, or on, start-stop-daemon will display a
progress meter while waiting for a daemon to stop.
2016-09-16 14:23:09 -05:00
William Hubbs
a4e0d675e1 man/openrc-run.8: update variable documentation
- document command_args_background and command_user.r
- clarify documentation for command_background

This fixes #78.
2016-09-13 14:02:10 -05:00
Mike Gilbert
5537994002 man: Document the procname variable for openrc-run
X-Gentoo-Bug: 586794
X-Gentoo-Bug-URL: https://bugs.gentoo.org/586794
2016-06-23 17:46:11 -05:00
William Hubbs
62410eaf4b add daemon supervisor
The supervise-daemon process is meant to be a lightweight supervisor
which can monitor and restart a daemon if it crashes.
2016-04-27 11:13:50 -05:00
William Hubbs
69f052b611 librc: Complain when a real and virtual service have the same name 2016-01-21 15:58:03 -06:00
William Hubbs
000503fad7 Convert OpenRC to a centralized copyright/license structure
In the past, OpenRC was a hybrid of a centralized and file-scope
license/copyright structure.

I followed the instructions from the Software Freedom Law Center [1] to
convert to a Centralized structure where possible, for easier future
maintenance.

[1] https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
2015-12-21 12:16:06 -06:00
William Hubbs
b810473e4f man/openrc-run.8: Clarify documentation on dependencies and keywords
Provide an example of using the -containers keyword and clarify
documentation on some of the dependency functions.
2015-12-03 17:37:38 -06:00
William Hubbs
627e925463 add support for -containers keyword 2015-12-03 16:52:15 -06:00
William Hubbs
a0cf8f9124 Add detection for rkt containers 2015-12-02 10:20:39 -06:00
William Hubbs
9fedb3b40b Add detection for docker containers 2015-12-02 10:20:15 -06:00
Ian Stakenvicius
33d3f33b3c Implement "want" dependency
The want dependency is similar to the use dependency. If a service
script, for example called service1, adds "want service2" to its depend
function, OpenRC will attempt to start service2, if it exists on the
system,  when service1 is started.

However, service1 will start regardless of the status of
service2.

X-Gentoo-Bug: 406021
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406021
2015-11-12 12:32:45 -06:00
Mike Gilbert
bcb9c44e73 man: Document the stopsig variable
This variable can be used to set the signal to send if the service is
using start-stop-daemon.

This fixes #56
2015-05-27 14:09:45 -05:00
William Hubbs
b79d058f16 s6: Use s6-svc -Dd to stop services
This allows us to get rid of the sleep call in the stop function. Also,
we set a configurable timeout value for stopping daemons.
2015-05-14 11:40:29 -05:00
William Hubbs
e372f97beb Fix the s6 handling
This changes the default s6 service directory to /var/svc.d, also
it changes the code to work with the individual services instead of
forcing a rescan when a service is started or stopped.
2015-05-13 16:10:08 -05:00
William Hubbs
bb2d7becfd Add support for the s6 supervision suite 2015-05-11 18:36:49 -05:00
William Hubbs
0f9354becf man: Clarify the documentation for command_args
The command_args variable only works if using start-stop-daemon to start
the daemon.
2015-05-11 15:37:30 -05:00
William Hubbs
8c7ea4e9e8 runscript.sh: add chroot support
This adds support for a chroot variable which will be passed to the
start-stop-daemon --chroot switch to runscript.sh when starting a
daemon. This also needs to be saved so it can be used in locating the
pid file when stopping the daemon.

X-Gentoo-Bug: 524388
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=524388
2014-10-20 15:44:19 -05:00
William Hubbs
20006625a6 man: Document start_inactive and in_background_fake 2014-09-19 17:23:55 -05:00
William Hubbs
40141244e3 man/openrc-run.8: more updates and clarifications for checkpath
X-Gentoo-Bug: 500606
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=500606
2014-07-13 11:23:43 -05:00
Alexander V Vershilov
d59737afb1 man/openrc.8: update checkpath documentation
X-GENTOO-BUG: 500606
X-GENTOO-BUG-URL: https://bugs.gentoo.org/show_bug.cgi?id=500606
2014-07-13 08:50:36 -05:00
Alexander V Vershilov
f66f41c4f0 typo fix 2014-07-11 16:36:35 -05:00
William Hubbs
e5a94dd3f4 Add missing documentation for environment variables
Add documentation for the RC_SERVICE, RC_GOINGDOWN, RC_LIBEXECDIR and
RC_NO_UMOUNTS environment variables.

X-Gentoo-Bug: 489344
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=489344
2014-01-08 13:16:27 -06:00
William Hubbs
3470eda3f5 Rename runscript to openrc-run
This was requested by Debian, because the minicom software, which is
available on Debian and other distros, has a binary named runscript. We
are keeping a backward compatibility symlink for now, but this allows
Debian or any other distro to safely remove the symlink.

X-Gentoo-Bug: 494220
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=494220
2013-12-29 22:57:31 -06:00