2

I have a LSB script launching a daemon with commands like start, stop, restart, but also with custom commands, like start-dump.

Is it possible to achieve the same result with only a Systemd service unit definition? (no external script in /etc/init.d or whatever)

Note that start-dump would basically do a /my/executable --dump

1
  • On RH/CentOS/Fedora systems, my advice is to keep using service, which will allow extra verbs in /usr/libexec/initscripts/legacy-actions and fall through to systemd for start, stop, etc. Apr 23, 2019 at 8:31

1 Answer 1

0

I know it has been 3 years since this question was asked but I had the same question and I think I have an answer. You could create a systemd service and call it "foo-start-dump.service" and in that file have ExecStart=/my/executable --dump. Then you could execute:

# systemctl start foo-start-dump.service

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .