ezjail post_start_script

Hello,

I have a jail running with its config sitting in /usr/local/etc/ezjail/myjail. I want to run a custom command after the jail is up. So I tried
Code:
export jail_myjail_post_start_script="/usr/sbin/setfib 1 /sbin/route  del 192.168.1.15"

Unfortunately, this resulted in an error
Code:
eval: /usr/sbin/setfib 1 /sbin/route del 192.168.15: not found

Further, I tried passing the ip address to an external script using
Code:
export jail_myjail_post_start_script="/usr/local/bin myscript 192.168.1.15"

That failed in the same manner. Is it possible to specify custom commands in ezjail config?

Thanks
 
eval: /usr/sbin/setfib 1 /sbin/route del 192.168.15: not found

It appears that the parameter should be the name of a script file, not a command.

export jail_myjail_post_start_script="/usr/local/bin myscript 192.168.1.15"

A slash seems to be missing. But again, the parameter is probably just interpreted as a script name without a parameter. Put the parameter inside the myscript itself.
 
Back
Top