-
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
SystemVPlugin on Debian not working #955
Comments
Could you provide some more information (like your packaging configuration)? We're using this without problems for nearly a year now. |
enablePlugins(UniversalPlugin)
enablePlugins(DebianPlugin)
enablePlugins(SystemVPlugin)
enablePlugins(JDebPackaging)
enablePlugins(JavaServerAppPackaging)
maintainer := "SomeName"
daemonUser in Linux := "Someuser"
daemonUserUid in Linux := Some("id")
daemonGroup in Linux := "someuser"
daemonGroupGid in Linux := Some("id")
debianPackageDependencies in Debian := Seq("")
bashScriptExtraDefines += """addJava "-Dconfig.file=${app_home}/../conf/application.conf""""
bashScriptExtraDefines += """addJava "-Dlog4j.configuration=file:${app_home}/../conf/log4j.xml""""
mappings in Universal ++= {
val confDirectory = baseDirectory.value / "conf" / environment.value.name
Seq(
confDirectory / "application.conf" -> "conf/application.conf",
confDirectory / "log4j.xml" -> "conf/log4j.xml",
confDirectory / "application.ini" -> "conf/application.ini"
)
} |
Looks good so far the only difference to our options seems to be that we enable fewer plugins: enablePlugins(JavaServerAppPackaging, JDebPackaging, SystemVPlugin) I'll try to give this some thought but that will take a while because of current workload. |
thats no problem. I am having a workaround for specifying an alternate template without the log additions for the init.d file |
yeah this is the default setting, but despite having this set to None there will be empty quotes "" appended to the start-daemon command. |
I'm also experiencing this. From what I read, you cannot use environment variables to append redirection commands, as the parse order in bash is such that environment variables are expanded AFTER the redirection instruction is parsed. I tried a few things, and found success with a solution described here: |
Thanks for sharing @timcharper |
I submitted a fix here: build.sbt here: https://github.com/mesosphere/marathon/tree/tharper/1.5-packager-updates Issue is not documentation. I think the template is just broken. I have a PR to fix #1021 which I've confirmed works. |
Expected behaviour
sudo service name start
-> Service starts succesfull
Actual behaviour
service isn't starting
Information
In Version 1.0.5 everythings works. The bug introduced when the logging to the init.d file was introduced.
https://github.com/sbt/sbt-native-packager/blob/master/src/main/resources/com/typesafe/sbt/packager/archetypes/systemloader/systemv/start-debian-template#L51
There are 2 bugs i identified:
stdout_redirect
variable shouldn't be escaped when appending to thestart-stop-daemon
2>&1
and the escaping quotes fromstdout_redirect
it is workingi am not an expert with the service managers and stdout redirects so i can't say what would be correct.
The text was updated successfully, but these errors were encountered: