-
Notifications
You must be signed in to change notification settings - Fork 443
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
changed template for /etc/init/{{app_name}} This seems to fix issue #357... #358
Conversation
Hi @flowma, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement: |
Dupe of #357. (autogenerated issue from pr) |
# Start the process | ||
script | ||
exec ./bin/${{exec}} | ||
exec sudo -u ${{daemon_user}} ./bin/${{exec}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the -setuid
not work on Ubuntu 14.04?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works, but then the pre-start script fails because it is also executes as the ${{daemon_user}}.
thanks for the quick response :) One question, see above |
Build fails with "script doesn't contain start on [networking] header". True enough. 14.04's Upstart won't start this service, if app_name.conf contains this line. Anyway it's probably not safe to merge this, as is might break Ubuntu 12.04 support. Pls, feel free to incorporate these changes when you start to adjust for 14.04 in #348 or elsewhere. |
@@ -51,7 +51,7 @@ object JavaServerAppPackaging { | |||
private[this] def defaultFacilities(loader: ServerLoader): String = { | |||
loader match { | |||
case SystemV => "$remote_fs $syslog" | |||
case Upstart => "[networking]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this line. This can be changed via the settings requiredStartFacilities
and requiredStopFacilities
.
The build will then pass.
I did some research and it looks like your approach is the only way: I also found some posts referencing Ubuntu 12.04 LTS. Take a look at my last comment and then I'll test this on Ubuntu 12.04 and merge this. |
The logic works on my Ubuntu 12.04 LTS. |
4c031f4
to
e5ee3aa
Compare
Removed the line from the template and the Assert in the test. Pls excuse the rebasing. Seems to work in 12.04 and 14.04. |
|
||
# When to stop the service | ||
stop on runlevel ${{stop_runlevels}} | ||
stop on stopping ${{stop_facilities}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for asking again (and thanks for your patience). You removed these conditions as they won't work when stop_facilities
is empty, right? (just guessing). Is there are way to add just "nothing" ? Or aren't they needed at all?
Rebase is actually fine. One commits are a lot easier to merge/maintain between branches. |
You're right: it doesn't start with |
@kardapoltsev You had improved upstart support in #262. What is your take on this? |
Upstart is not my best friend). I'll have access to my Ubuntu 14 a bit later today and could try to dig into this issue. But I think we should try to keep ability for controlling startup order. |
May be better defaults will be |
The bigger problem is that, if case Upstart =>
val requiredStartFacilitiesReplacement = requiredStartFacilities match {
case null | "" => ""
case facilities => "start on " + facilities
}
// same for stop facilities
Seq("start_runlevels" -> startRunlevels,
"stop_runlevels" -> stopRunlevels,
"start_facilities" -> requiredStartFacilitiesReplacement ,
"stop_facilities" -> requiredStopFacilitiesReplacement) the script would then look like this # When to start the service
start on runlevel ${{start_runlevels}}
${{start_facilities}}
# When to stop the service
stop on runlevel ${{stop_runlevels}}
${{stop_facilities}} WDYT? |
Why not use |
I agree with you @kardapoltsev , unfortunately we would have to change the Would you mind providing a second pr which fixes this after this one is merged? |
I'll do. |
I'll merge this for now. Thanks @flowma for your work :) @kardapoltsev , I'll rebase #348 and include this fix and the settings change. We need to make a release, soon because of a bouncy-castle update. |
changed template for /etc/init/{{app_name}} This seems to fix issue #357...
Adding changes discussed in #358
Adding changes discussed in #358
Adding changes discussed in #358
Adding changes discussed in #358
... for Ubuntu 14.04.