Glorious1
Guru
- Joined
- Nov 23, 2014
- Messages
- 1,211
I have a jail with some scripts. They get started with a Post-Init task. One script calls the next and so on. I would like to be able to run them via Post-Init task or locally in jail for troubleshooting.
I found in the Post-Init task, I had to call the script with the global path:
In cron jobs, there seems to be a nice fix for this: the scripts use local paths, and the cron task calls the script with
Is there a way to do this?
I found in the Post-Init task, I had to call the script with the global path:
/mnt/Ark/iocage/jails/jailname/root/****
. Then apparently each reference to another script has to have the global path. But if I am in the jail testing, that path is no good; the scripts have to refer to another using ./
or start from the jail root.In cron jobs, there seems to be a nice fix for this: the scripts use local paths, and the cron task calls the script with
iocage exec <jailname> /path/from/jailroot/script.sh
. But that doesn't work in Post-Init jobs, or I can't get it to.Is there a way to do this?