Why can’t you restart it from the Discourse directory? The script to do this job is intended to be run from there.