Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions sh/openrc-run.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ default_status()
$func
}

default_reload()
{
case "$supervisor" in
s6) s6_reload ;;
?*)
eerror "$RC_SVCNAME: undefined function 'reload'"
exit 1
;;
esac
}

# Template start / stop / status functions
# package init scripts may override these, but the bodies are as minimal as
# possible, so that the init scripts can creatively wrap default_*
Expand All @@ -222,6 +233,11 @@ status()
default_status
}

reload()
{
default_reload
}

# Start debug output
yesno $RC_DEBUG && set -x

Expand Down
11 changes: 4 additions & 7 deletions sh/s6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ _s6_servicedir_create() {
fi

{
# We use execline here because it makes code generation easier.
# Generating execline code here because it is much easier than generating sh.
# The command will still be interpreted by sh in the end.
echo "#!$_execlineb -S1"
if test -n "$umask" ; then
Expand Down Expand Up @@ -222,12 +222,9 @@ s6_status() {
fi
}

restart() {
_s6_set_variables
s6-svc -r -- "$_service"
}

reload() {
s6_reload() {
_s6_set_variables
ebegin "Reloading $name"
s6-svc -h -- "$_service"
eend $? "s6-svc -h command failed"
}
Loading