2

I am trying to launch a .jar inside a screen session at boot using /etc/init

Here is my script (pretty standard:)

start on runlevel [2345]
stop on runlevel [^2345]
console log
chdir /home/administrator/cisco
setuid administrator
setgid administrator
respawn
respawn limit 20 5
exec /usr/bin/screen -S cisco /usr/bin/java -Xms6G -Xmx12G -XX:PermSize=2G -jar cisco.jar nogui

If I remove the screen portion of command (/usr/bin/screen -S cisco) the .jar launches perfectly at boot as expected. There is something wrong with the syntax when using screen.

It should also be noted that I ran init-checkconf on the file (as seen below) and it passed.

init-checkconf -d /etc/init/cisco.conf

Please help. I really need to be able to attach back to these sessions to see the java console.

Thanks,
Atomiklan

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.