Age | Commit message (Collapse) | Author |
|
- fix mount options for /run.
- run restorecon after everything is set up.
X-Gentoo-Bug: 740576
X-Gentoo-Bug-URL: https://bugs.gentoo.org/740576
|
|
Fixes: #407
|
|
This should make cgroup_cleanup work successfully since cgroup_get_pids
no longer uses a subshell.
This fixes #396.
This fixes #397.
|
|
|
|
X-Gentoo-Bug:739274
X-Gentoo-Bug-URL:https://bugs.gentoo.org/739274
|
|
This fixes #328
|
|
use grep -E instead of egrep
check for space or end of line instead of GNU-specific word boundary
This fixes #345
|
|
prior to cgroups getting mounted, /sys/fs/cgroup will still exist,
but attempts to make directories in it will fail, change cgroup2_set_limits() to
verify that cgroups are mounted instead of just checking that /sys/fs/cgroup
exists.
This fixes #307.
This fixes #321.
|
|
This fixes #295.
|
|
This is for #288.
|
|
This time it was done correctly.
I missed a '\' the last time.
|
|
For some reason removing this broke the build.
This reverts commit 5246ea7b6f8c6a247403f725f8301457f6ddfffd.
|
|
We have used /run for some time now and we have had this migration
script for 6 years. Linux users should have upgraded by now to a version
of OpenRC which stores its information in /run.
|
|
I do not know of a need to have the default shell be a build-time
configurable setting. All *nix systems I am aware of have /bin/sh as a
default posix compatible shell.
If some systems running OpenRC do not make that assumption about
/bin/sh, I will consider bringing this back, so feel free to open an
issue.
|
|
This is not a stand-alone script, so it does not need the shebang line.
This also means it is not necessary to run this through sed.
|
|
|
|
Since the pid file is internal to us, start moving toward deprecating it
by not requiring the user to specify it.
In the next release, I plan on working on code to start phasing out the
use of a pid file if this is possible.
|
|
|
|
The pidfile of the supervisor doesn't need to be adjustable by the
service script. It is only used so the supervisor can stop itself when
the --stop option is used.
|
|
This fixes #230.
|
|
Health checks are a way to monitor a service and make sure it stays
healthy.
If a service is not healthy, it will be automatically restarted after
running the unhealthy() function to clean up.
|
|
|
|
This is an old relic from Gentoo baselayout-1.x which should not be used
any longer.
|
|
|
|
|
|
is undefined
|
|
This is handled inside librc, so we don't need the nesting in this
script.
|
|
Remove the IFS manipulation and simplify the loop that processes the
settings.
|
|
Some initramfs mount /run which then ends up with the wrong labels.
Force relabel all of /run right after its mounted to fix.
|
|
/dev/console is relabelled later in the devfs init script, but by then we
have already missed some of the messages, so fix that label early.
|
|
The current check only tries to detect whether /sys/fs/cgroup exists and
whether it is writable or not. But when the init system doesn't mount
cgroups then /sys/fs/cgroup will just be an empty directory. When paired
with unprivileged containers that mount sysfs this will cause misleading
errors to be printed since /sys/fs/cgroup will be owned by user
nobody:nogroup in this case. Independent of this specific problem this
check will also be misleading when the /sys/fs/cgroup exists and is in
fact writable by the init system but isn't actually a mountpoint.
Note from William. "grep -qs" doesn't need to redirect output to
/dev/null since it is completely silent.
This fixes #209.
|
|
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.
|