I am following the instructions in the "Installation as an init.d service (System V)" chapter of the Spring Boot Reference Guide.
I am not able to create a symbolic link to my Java app in init.d on Centos 6.6.
After I run
sudo ln -s /var/myapp/myapp.jar /etc/init.d/myapp when I try
chmod 500 /etc/init.d/myapp I get
chmod: cannot operate on dangling symlink `myapp' When I change the permissions on a regular file instead of the symlink like this :
chmod 500 myapp.jar The symlink is of course still broken and I can't see it in service --status-all.
Also I can confirm that the symbolic link is not created correctly because I cannot start my app with
java -jar /etc/init.d/myapp Note : When I just copy the entire jar to /etc/init.d/ everything works fine.
I don't even know is it considered "good" to create a symlink to a jar file or should I just copy it to /etc/init.d/ ?