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:
Jose Diaz-Gonzalez
2024-09-28 21:11:13 -04:00
parent 5857a937d5
commit e905503bb9
2 changed files with 7 additions and 2 deletions

View File

@@ -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)"