# ezjail post_start_script



## trumee (Oct 12, 2015)

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

```
export jail_myjail_post_start_script="/usr/sbin/setfib 1 /sbin/route  del 192.168.1.15"
```

Unfortunately, this resulted in an error

```
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

```
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


----------



## wblock@ (Oct 12, 2015)

trumee said:


> 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.



trumee said:


> 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.


----------

