Why doesn't 'jexec hostname' work for executing into a jail?

Status
Not open for further replies.

Supa

Patron
Joined
Jan 10, 2014
Messages
204
I know I can get a list of the jails via 'jls' and enter the shell using the # but it changes periodically... and I have a cron job that relies on entering the jail.

Any info would be appreciated. Thanks.
 
Joined
Jul 10, 2016
Messages
521
The hostname (or jail name) is not identical to the jail ID; iocage adds a prefix "ioc-" to make up the jail ID, so if your jail is called plex, you need to do jexec ioc-plex
Also, if there's a dot in the name, it will be replaced with an underscore.

Run jls -N to see the actual jail IDs. Note that only jails that are "up" will be listed.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Hadn't run into that before; I'd just used iocage exec jailname command. jexec jailname command works for warden jails, though.
 
Status
Not open for further replies.
Top