Fix init scripts to use env vars correctly.