Postby Oleg » Tue Apr 13, 2010 11:16 am
/bin/sh is the convention when one needs a posix-compliant shell.
The short version: I suggest not messing with it.
The long version: /bin/sh is often built to work on damaged systems. Most shells have an option to statically compile themselves, so that only the actual /bin/sh binary is needed to run shell scripts. Some systems put /usr on its own partition, and if it fails to mount /usr/bin/env would not exist but /bin/sh would still be usable. Using "/usr/bin/env sh" as shebang has the effect of reducing the set of systems capable of running the script.
Now, for phpbb the above is unlikely to be of any practical concern, but I do not recall ever seeing "/usr/bin/env sh" as shebang, ever, so using it would probably raise eyebrows.
In the rest of the script there is no need to use env as binaries will be looked up in PATH by the shell.