Skip to content
Snippets Groups Projects
Commit 82cd7760 authored by Iustin Pop's avatar Iustin Pop
Browse files

Improve the example startup script


Currently, the supplised script has two issues:
  - it doesn't use start-stop-daemon --start correctly, leading to
    messages like "ganeti.errors.GenericError:
    /var/run/ganeti/ganeti-rapi.pid contains a live process" in the logs
  - it doesn't allow start/stop/restart of a single daemon, which leads
    to manual launch, which is bad because we don't reuse the settings
    from the defaults file

For the first one, we change from ‘--exec …’ to ‘--startas …’, which is
the actual option used for start, whereas exec is a test (that also
supplies the default to startas). We also add ‘--oknodo’ as per recent
Debian policy changes.

For the second, we do a bigger change; we basically remove the full-path
and pid variables, and construct these two from the daemon name. We then
check if we are given a daemon name (in which case we only do that)
otherwise we do the requested action on all daemons.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent a02b4427
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment