Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec $java_cmd vs simple $java_cmd in bash script #99

Closed
kardapoltsev opened this issue Dec 3, 2013 · 6 comments
Closed

exec $java_cmd vs simple $java_cmd in bash script #99

kardapoltsev opened this issue Dec 3, 2013 · 6 comments

Comments

@kardapoltsev
Copy link
Member

If we'll able to set it in configs (e.g. fork in run) then it'll be possible to use bash script in java_server_application in /etc/init.d/ script to start the app. No the problem is in the pid of java process, which is used in start-stop-daemon.

What do you think about it?
In bash template:

${{exec_cmd}} "$java_cmd" 

And in bash script replacements smth like this:

replacements ++= Seq("exec_cmd" -> (if(fork) "exec" else ""))
@jsuereth
Copy link
Member

jsuereth commented Dec 9, 2013

Ah. I had forgotten that this alters the PID. Assuming non of the other features break, I'd be all for this. One of my goals (which may be impractical) is to have the same script to start an application or server and wrap them for rc.d or upstart. If we cant' acheive that, at least having as similar as possible the options would be good.

Would you have time to put your thoughts in a pull request? I'm not sure I understanding 100% what the correlation to fork in run is.

@kardapoltsev
Copy link
Member Author

May be we could try simply remove exec and test that all other features work fine?

@jsuereth
Copy link
Member

jsuereth commented Dec 9, 2013

will do. Probably not today. I'll try to set aside tomorrow for sbt-native-packager work.

@kardapoltsev
Copy link
Member Author

I'm still think that we should check this. /etc/init.d/ script will be simpler and more readable.

@jsuereth
Copy link
Member

Ah, right. Lost track of this. NOW that we have pull request validation, you can create a pull request which will run our test scripts. I'll do it now on ubuntu and see what happens.

@jsuereth
Copy link
Member

Appears to work. Leaving the PR open for someone to give a look-over before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants