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

Disable service autostart during package install #807

Closed
jpic opened this issue Jun 13, 2016 · 12 comments
Closed

Disable service autostart during package install #807

jpic opened this issue Jun 13, 2016 · 12 comments

Comments

@jpic
Copy link
Contributor

jpic commented Jun 13, 2016

Currently, our service packaged with sbt-native-package auto-starts after apt-get install. In our case, it may fail to start with the default configuration. We might want to 0. apt-get install 1. do our config file and 2. start the service. Is this use case supported ?

Note that I haven't tested inhibiting rc.d which might work too, so I'm unsure about the importance of this use case.

@jpic jpic changed the title Failing autostart Disable service autostart during package install Jun 13, 2016
@muuki88
Copy link
Contributor

muuki88 commented Jun 13, 2016

This is currently hard coded in the SystemloaderPlugin.

You could filter out the specific lines from maintainerScripts in Debian, which is kind of hacky and breaks if we change a little bit of the bash code.

More over the startService bash method currently does two things: register the service and start it.

So this would be a feature request to refactor those into two functions and provide an option to disable the auto start.

@jpic
Copy link
Contributor Author

jpic commented Jun 17, 2016

Just wanted to let you know that my friends affected by this are currently unable to work on this because they are at the Scala days in Berlin if I'm not wrong.

Will pick it up next week.

Thanks for your patience.

@muuki88
Copy link
Contributor

muuki88 commented Jun 17, 2016

Oh no! I was in Berlin, too. We could have paired this 🤗

@jpic
Copy link
Contributor Author

jpic commented Jun 19, 2016

<3 the idea, can we perhaps pair on that some time this week ?

@muuki88
Copy link
Contributor

muuki88 commented Jun 19, 2016

Sure thing. Hangout or Skype would be fine. Just write me an email or a twitter pn.

@redarqas
Copy link

i'll start working on play showcase app, to share problems that we encounter.

@jpic
Copy link
Contributor Author

jpic commented Jun 28, 2016

Question: how should this feature look like for the user ? should we add a file like "no_autostart" in a directory or should we set the option elsewhere ?

@muuki88
Copy link
Contributor

muuki88 commented Jun 28, 2016

Good question. The obvious way would be to add a setting serviceAutostart = settingKey[Boolean] in the SystemloaderPlugin, which is by default true to preserve current behaviour. This solution doesn't scale if we would want to make more customizations to the systemloader behaviour, but I can't think of a lot more things you should be able to customize via settings. So I would go for a simple setting.

@dpennell
Copy link
Contributor

dpennell commented Jul 8, 2016

if nobody objects, I'd like to take this and submit a pull request later today. I encountered the same issue a few weeks ago and hacked something in my local build to unblock my team. I'll incorporate the serviceAutostart setting described above.

@muuki88
Copy link
Contributor

muuki88 commented Jul 8, 2016

Looking forward to your pr 😃

@dpennell
Copy link
Contributor

PR submitted, all tests passed

@muuki88
Copy link
Contributor

muuki88 commented Jul 17, 2016

Closed with #847

@muuki88 muuki88 closed this as completed Jul 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants