mirror of
https://github.com/dokku/dokku.git
synced 2026-02-23 19:50:34 +01:00
fix: compute path for docker-container-healthchecker
This fixes an issue for source-based Dokku installs where the binary is installed in /usr/local/bin instead of /usr/bin due to not being installed via an OS package. Closes #7010
This commit is contained in:
@@ -153,7 +153,10 @@ trigger-scheduler-docker-local-check-deploy() {
|
||||
echo "$content" >"$TMP_APP_JSON_OUTPUT"
|
||||
fi
|
||||
|
||||
sudo /usr/bin/docker-container-healthchecker check "$DOKKU_APP_CONTAINER_ID" "${ARG_ARRAY[@]}" || FAILEDCHECKS="$?"
|
||||
local docker_container_healthchecker_path
|
||||
docker_container_healthchecker_path="$(command -v docker-container-healthchecker)"
|
||||
|
||||
sudo "$docker_container_healthchecker_path" check "$DOKKU_APP_CONTAINER_ID" "${ARG_ARRAY[@]}" || FAILEDCHECKS="$?"
|
||||
|
||||
if [[ $FAILEDCHECKS -gt 0 ]]; then
|
||||
"$DOCKER_BIN" container update --restart=no "$DOKKU_APP_CONTAINER_ID" &>/dev/null || true
|
||||
|
||||
@@ -16,7 +16,9 @@ trigger-scheduler-docker-local-install() {
|
||||
|
||||
rm -f "/etc/sudoers.d/dokku-cron"
|
||||
|
||||
echo "%dokku ALL=(ALL) NOPASSWD:/usr/bin/docker-container-healthchecker" >"/etc/sudoers.d/dokku-docker-container-healthchecker"
|
||||
local docker_container_healthchecker_path
|
||||
docker_container_healthchecker_path="$(command -v docker-container-healthchecker)"
|
||||
echo "%dokku ALL=(ALL) NOPASSWD:$docker_container_healthchecker_path" >"/etc/sudoers.d/dokku-docker-container-healthchecker"
|
||||
chmod "0440" "/etc/sudoers.d/dokku-docker-container-healthchecker"
|
||||
|
||||
DOKKU_PATH="$(command -v dokku)"
|
||||
|
||||
Reference in New Issue
Block a user