From 1e18b36add500806a7437e63e0e4f3bdd2210080 Mon Sep 17 00:00:00 2001 From: Johno Crawford Date: Wed, 13 Apr 2016 12:19:29 +0200 Subject: [PATCH] Ensure required paths are available when post script is executed. I observed when csf is updated via cron [1] that the rules csfpost.sh should generate are not present, I suspect the path to the binaries invoked are not available. [1] cat /etc/cron.d/csf_update SHELL=/bin/sh 27 4 * * * root /usr/sbin/csf -u --- docker.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker.sh b/docker.sh index a178677..9344f48 100644 --- a/docker.sh +++ b/docker.sh @@ -1,5 +1,7 @@ #!/bin/bash +export PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + chain_exists() { [ $# -lt 1 -o $# -gt 2 ] && { echo "Usage: chain_exists [table]" >&2