I am currently writing a Java daemon. I am writing a script that will have standard daemon commands (start, stop, restart, status), and I'm trying to decide where everything should go when the daemon is installed.
My current idea is:
PID file: /var/run/myapp.pid
Daemon Script: /etc/init.d/myapp
Java application (.jar): / usr / bin / myapp
Logs: /var/log/myapp.err , /var/log/myapp.log , /var/log/myapp.info (you get the idea)
Configurations: /etc/myapp.conf (or / etc / myapp / configs-go-here if I have more than one in future )
I'm still new to the Linux directory structure, so if I do something wrong, let me know. What confuses me is that my Java application is a .jar file (archive), not a binary. Does this mean that / usr / bin / is not the "right" place for it?
source
share