1
0
mirror of https://github.com/juliengk/csf-post-docker.git synced 2023-10-10 13:37:41 +02:00

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

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
export PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
chain_exists() { chain_exists() {
[ $# -lt 1 -o $# -gt 2 ] && { [ $# -lt 1 -o $# -gt 2 ] && {
echo "Usage: chain_exists <chain_name> [table]" >&2 echo "Usage: chain_exists <chain_name> [table]" >&2