I want to launch a java program (server program) at computer startup. I can run it from the command line perfectly.
I created /Library/Server/startFS.sh
. The file is executable by root and contains:
cd /Library/Server/FiloSync
/usr/bin/java -jar /Library/Server/FiloSync/filosync-server-latest.jar -p 7000 -s 7001
I can't get my launchd .plist
included here, the formatting is all off.
I can run it fine from the command line: ./startFS.sh
, but when I put create the plist (via Lingon), nothing happens.
Now, when run, it outputs a few lines to the console. Might that be problem?
I have tried prepending nohup
and appending &
, but no combination seems to work.