juli3nk / csf-post-docker

CSF with support for Docker
56 stars 35 forks source link

error with csf csf: v9.23 (generic) and docker version 1.11.2, build b9f10c9 #8

Open mahgblack opened 7 years ago

mahgblack commented 7 years ago

im getting this error, rules doesnt update, lost communications with dockers containers

/usr/local/csf/bin/csfpost.sh: 43: [: default: unexpected operator Bad argument value>/32' Tryiptables -h' or 'iptables --help' for more information. Bad argument value>/32' Tryiptables -h' or 'iptables --help' for more information. iptables v1.4.21: Bad IP address "<no"

mahgblack commented 7 years ago

fix this line in the code if [ $netmode == "default" ]; then,, change it for if [ $netmode = "default" ]; then in docker.sh script that solved the problem in ubuntu.

http://unix.stackexchange.com/questions/72039/whats-the-diference-between-comparison-inside-if-using-two-or-a-single-equal

ghost commented 7 years ago

/bin/sh should be pointing to /bin/bash and not /bin/dash if you want the script to work properly

JoyceBabu commented 4 years ago

If the script requires bash, wouldn't it be better to use #!/bin/bash as shebang?

ghost commented 4 years ago

you are right!