[clug] init.d for chroot

Bob Edwards bob at cs.anu.edu.au
Wed Jul 12 06:35:49 UTC 2017


On 12/07/17 15:09, jm via linux wrote:
> In this case I found that supervisord can be shutdown via "supervisorctl
> shutdown", so
>
>   chroot /chrootpath /usr/bin/supervisorctl shutdown
>
>
> In general, I'd still like to know if I wasn't dealing with a process
> with a shutdown command how I could have recorded the pid to kill it later.
>
> Jeff.

Linux Containers (lxc) (and equivalent docker etc.) are like chroot on
steroids - in this case keeping processes isolated, so you can run an
init.d (as pid 1) in the container, and also run supervisord etc. in
the container, separately to the host's versions of the same.

Not sure what support Centos 6 has for containers, though...

cheers,

Bob Edwards.

>
> On 12/07/2017 14:44, jm via linux wrote:
>> Does anyone have any experience with scripts like this or thoughts on
>> how to do this? I'm currently think about putting a wrapper around
>> supervisor that runs in the chroot env to record the pid in the chroot env.
>>
>> Jeff.
>>
>>
>>
>
>




More information about the linux mailing list