Age | Commit message (Collapse) | Author |
|
This function should only be called once and it does not take any
arguments.
X-Gentoo-Bug: 639166
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=639166
|
|
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.
|
|
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.
|
|
This makes ps show which service the supervisor is monitoring.
|
|
The unsupervised status is to be used when a supervisor of a supervised
service dies but leaves the service daemon itself running.
|
|
|
|
- do not sleep for the full 90 seconds if processes are dead
- re-arrange the order of signals we attempt to send to the processes
|
|
This is to be used if the service is being supervised and the
supervisor is somehow killed.
Currently, this is very linux specific, but I will expand to other
platforms, patches are welcome.
|
|
This makes the cgroups handling consistent between cgroups v1 and v2.
Also, it fixes #167.
|
|
|
|
This is related to #164.
|
|
If we were able to kill all the processes in the cgroup, it should be
removed.
|
|
cgroup_cleanup should warn if it is unable to clean up all processes in
the control group, but it will always return success.
|
|
The "SIG" prefix on signal names passed to kill -s isn't portable.
|
|
|
|
Instead of looping and sending multiple signals to child processes in
cgroup_cleanup, we send sigterm followed by sleeping one second then
sigkill.
This brings us more in line with systemd's "control group" killmode
setting.
Also, this commit includes several shellcheck cleanups.
|
|
|
|
This is for #94.
|
|
The --retry option for supervise-daemon defines how the supervisor will
attempt to stop the child process it is monitoring. It is defined when
the supervisor is started since stopping the supervisor just sends a
signal to the active supervisor.
This fixes #160.
|
|
This is needed to allow the service script author to set a default for
rc_ulimit inside the service script.
|
|
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.
|
|
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.
|
|
We do not need to care about the path on the shebang line of a service
script as long as the shebang line ends with "openrc-run".
This fixes #119 and #120.
|
|
|
|
This script only runs on Linux, so the check will always be false.
|
|
This will also warn users if md5sum is missing, which serves as a pretty
good indicator that /usr is not mounted.
|
|
Supervisor setups break easily when start/stop/status functions are not
default.
Applications that write multiple PIDs to a pidfile (eg HAProxy as
described in bug 601540), can also benefit from being able to call the
default start/stop/status with modified environment variables.
Expose the default start/stop/status functions as
default_start/stop/status, and use them for the defaults
start/stop/status.
Trivial usage example:
```
stop()
{
t=$(mktemp)
for pid in $(cat $pidfile) ; do
echo $pid >$t
pidfile=$t default_stop
done
rm -f $t
}
```
X-Gentoo-Bug: 601540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/601540
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
Fixes #99
|
|
The openntmpfiles package is designed so that it can be used on systems
independently of whether openrc is used.
|
|
This allows us to avoid the warnings from bash-4.4 about null bytes in
command substitutions.
If you have separate /usr, are not using an initramfs, and have a file
called /proc/self/environ on your root file system, this will break.
X-Gentoo-Bug: 594534
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=594534
|
|
This reverts commit 0d1f1010c299a95332f224c3be9e8dfdd85eec54.
We need the eval in case someone uses something like:
command_args="this \"is a\" test"
This is related to #77.
|
|
This fixes #77.
|
|
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.
|
|
This is needed because containers may give read access to cgroups but
not allow the settings to be changed.
|
|
This fixes #79.
|
|
This fixes the test for cache restoration since we are no longer caching
the dependency tree.
|
|
X-Gentoo-Bug: 503134
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=503134
|
|
X-Gentoo-Bug: 501364
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=501364
|
|
btrfs support is not implemented yet (for q Q v), but at least tmpfiles.sh
no longer chokes about tmpfiles.d lines of recent systemd versions
This fixes #87.
|
|
This brings us closer to being able to use tmpfiles.sh as a full
replacement for systemd-tmpfiles.
This closes #83.
|
|
This is part of #83.
|
|
This is part of #83.
|
|
|
|
The support for the chroot variable was broken in 0.16, this fixes that
breakage.
|
|
The supervise-daemon process is meant to be a lightweight supervisor
which can monitor and restart a daemon if it crashes.
|
|
The read builtin in most shells will interpret backslash characters
as escapes, and they are lost when reading binfmt files line-by-line.
This causes magic strings containing backslashes to be mangled and
become invalid, resulting in erroneous 'invalid entry' messages.
The -r option to read disables special handling of backslashes and
keeps all lines intact.
X-Gentoo-Bug: 575114
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=575114
|
|
X-Gentoo-Bug: 572602
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572602
|
|
The s6-svc syntax changed for wait-up, wait-ready, wait-down, and
wait-finished. This changes the s6 handling script to use the current
valid syntax.
This fixes #65.
|
|
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
|
|
- gendepends.sh needs to read this directory to allow dependencies to be
overridden
- init.sh for Linux and Bsd need to read it to allow config settings
they use to be overridden.
|