I'm writing a few daemons implemented in pure shell script and would like to use zsh(powerful substitutions, modules with socket/tcp handling, etc) instead of the default /bin/sh. Can I tell the 'script' stanza to use a custom shell?
There is no [documented] way to switch from /bin/sh as the main shell script run in. However, you could just wrap your script up in zsh. I do this with bash in various places (usually find's -exec clause):
A slightly more elegant way would be: