init-script-template
init-script-template copied to clipboard
check for file with content
I'm running as a non-root user that doesn't have access to /var/run. What I have to do so that the user has access to the pid file is to create it beforehand:
sudo touch /var/run/$appName.pid
sudo chown $userName /var/run/$appName.pid
But this results in Already running all the time because the script checks only for file existence. My change checks for something in the file too.