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

Systemd enable/disable behaviour #248

Closed
ErisDS opened this issue Jun 28, 2017 · 0 comments · Fixed by #258
Closed

Systemd enable/disable behaviour #248

ErisDS opened this issue Jun 28, 2017 · 0 comments · Fixed by #258

Comments

@ErisDS
Copy link
Member

ErisDS commented Jun 28, 2017

In order to fully setup Ghost with systemd, we need to call systemctl enable <servicename>.

Short term, we're going to do this as part of setup, just to get the call in to the codebase.

Longer term, we need a slightly more elegant solution.

The problem with enabling during setup, is that if the user chooses not to start Ghost, it will be started if the server is then restarted. This is a bit odd.

Instead, we need some more elegant logic to handle calling enable on the first start, if enable has not already been called.

The suggested logic is:

  • systemd could add something like an --enable option to ghost start and a --disable option to ghost stop
  • systemd would check if it's enabled on ghost start
  • if it's not and --enable is not passed, prompt the user and ask if they want to enable
  • if it is enabled do nothing regardless of whether or not --enable is passed (edited)
  • for stop, it wouldn't disable unless --disable is passed (edited)
  • the stop --disable part is for people who are stopping a blog but not uninstalling it
ErisDS added a commit to ErisDS/Ghost-CLI that referenced this issue Jun 28, 2017
refs TryGhost#216, TryGhost#248

- add an extra step to enable systemd on setup
   - this is what tells systemd to start the service on server restart
- Update the template to contain docs link
@ErisDS ErisDS added the rogue label Jul 2, 2017
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jul 3, 2017
closes TryGhost#248
- add isEnabled, enable, disable methods to process manager
- add support for enable/disable to start and stop commands
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jul 3, 2017
closes TryGhost#248
- add isEnabled, enable, disable methods to process manager
- add support for enable/disable to start and stop commands
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jul 3, 2017
closes TryGhost#248
- add isEnabled, enable, disable methods to process manager
- add support for enable/disable to start and stop commands
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jul 3, 2017
closes TryGhost#248
- add isEnabled, enable, disable methods to process manager
- add support for enable/disable to start and stop commands
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jul 3, 2017
closes TryGhost#248
- add isEnabled, enable, disable methods to process manager
- add support for enable/disable to start and stop commands
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jul 3, 2017
closes TryGhost#248
- add isEnabled, enable, disable methods to process manager
- add support for enable/disable to start and stop commands
acburdine added a commit that referenced this issue Jul 3, 2017
closes #248
- add isEnabled, enable, disable methods to process manager
- add support for enable/disable to start and stop commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant