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
This commit is contained in:
Johno Crawford 2016-04-13 12:19:29 +02:00
parent bfb06300d5
commit 1e18b36add
1 changed files with 2 additions and 0 deletions

View File

@ -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 <chain_name> [table]" >&2