We won't need this madness anymore in the new script, and the old script didn't seem to care too much.
This appears to work for starting the process, although who knows if all the pid stuff is working correctly.
We also need a directory to exist where the java process (which runs as a non-root user) can write the pid file.