-
Notifications
You must be signed in to change notification settings - Fork 446
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
service start on Centos produces ENOTTY error #275
Comments
Specially for play applications we have notes in
In this case 2 pid files will be created.
That not a good idea I think because in this case all programmers should implement same functionality in their apps. Also, my application doesn't know anything about different systems and pid file locations. Just let play application create another pid. See #164 for more details about this. |
We struggeled a lot with the daemon command as this leaves the responsibility to the app. It only worked in specific cases. Can you give some more details on the error and your CentOS setup so we can reproduce the error. Overriding the template can be done via configuration. Take a look at http://www.scala-sbt.org/sbt-native-packager/DetailedTopics/archetypes.html#overriding-templates |
Oh. I read your stackoverflow answer. Nice work @kardapoltsev |
I have tried to compile a small script from the play 2 framework as a rpm package using the sbt-native-packager. This produces a valid rpm, but on Centos the startup script in etc/init.d does not work, it seems to me, that the application tries to do something that requires a tty which nohup currently used in the startup template does not provide. I have asked about this on stackoverflow as well, further details can be seen there.
I managed to work around this by changing the start-call in the script in etc/init.d as follows:
I've also removed the lines echoing the PID into the PIDFILE further down, which moves responsibility for the pidfile to the application, the script just uses it to kill the process when necessary.
This seems to work fine for me on Centos6.5. I have also changed the template for the script to reflect these changes, but was unable to successfully compile the packager for some scala reason I don't fully grasp, so couldn't test these changes.
I am happy to create a pull request if this is deemed a sensible change.
The text was updated successfully, but these errors were encountered: