karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
298 stars 106 forks source link

on-connect does not work with chroot on #339

Closed simon1tan closed 3 years ago

simon1tan commented 3 years ago

With my config like this:

/mnt/data/src/icecast-kh-icecast-2.4.0-kh15/test/on-connect.sh /mnt/data/src/icecast-kh-icecast-2.4.0-kh15/test/on-disconnect.sh

...

0

both scripts are able to output a test file successfully. When I turn on chroot and use sudo to start icecast, I cannot get the scripts to run. Tried:

on-connect.sh on-disconnect.sh

...

/mnt/data/src/icecast-kh-icecast-2.4.0-kh15/test 0 crazy crazy

I expect it to chroot into /mnt/data/src/icecast-kh-icecast-2.4.0-kh15/test where the scripts are located and be able to execute them. Files belong to user and executable. Any thoughts/advice?

karlheyes commented 3 years ago

you can try it manually, chroot in the shell and try to run the scripts. Failures can be easy with chroot, it is usually because the runtime environment is not set up fully. eg, is the shell available in the jail?

chroot /mnt/data/src/icecast-kh-icecast-2.4.0-kh15/test /on-connect.sh

karl.

simon1tan commented 3 years ago

thanks, I got it working