Answer the question
In order to leave comments, you need to log in
Bash script execution error, what could be the error?
I create my own action rule in fail2ban
actionban = /home/ban.sh ban <ip>
The ban.sh file itself
#!/bin/bash
/usr/bin/python3 /home/ban.py $1 $2
exec: /home/ban.sh ban <ip>
stderr: '/bin/sh: 1: Syntax error: end of file unexpected'
returned 2
Answer the question
In order to leave comments, you need to log in
and if
1) remove the line #! /bin/bash in general or replace with #!/bin/sh ?
2) replace the ban.sh script with ban.py - write it in python at the top of the line: #! /usr/bin/python3
Why run a python script from a bash script?
Run the python script right away.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question