From: Michael Orlitzky <mjo@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Safe systemd "reload" command
Date: Sun, 5 Jun 2016 09:37:33 -0400 [thread overview]
Message-ID: <57542B1D.70103@gentoo.org> (raw)
In-Reply-To: <1465111405.5349.53.camel@gmail.com>
On 06/05/2016 03:23 AM, J. García wrote:
> I run systemd , but I have not tested your script, as of now I'm not
> using spamassassin, but I will at some time in near future; but looking
> at the script, I see some problems, you run the OpenRC restart commands
> even if systemd is available, further it doesn't know which one is
> running, as both can be installed(And are installed if using systemd),
That's what the "/etc/init.d/spamd status" command is meant to check.
The "... status" will only return success if you are running spamd via
openrc. Likewise, as I understand it (but haven't tested), the
"systemctl try-restart spamassassin" command will only work if you are
*using* systemd and the spamassassin service is running. They should be
harmless otherwise.
For example...
# spamd --daemonize
# /etc/init.d/spamd status
* status: stopped
# echo $?
3
If on the first line I had done "systemctl start spamassassin.service",
I should get the same result, so the openrc reload commands will be
skipped for systemd users.
I did take your suggestion and check for rc-service though. I shouldn't
count on openrc being in @system forever.
next prev parent reply other threads:[~2016-06-05 13:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-04 22:48 [gentoo-user] Safe systemd "reload" command Michael Orlitzky
2016-06-05 0:19 ` Rich Freeman
2016-06-05 0:47 ` Michael Orlitzky
2016-06-05 1:01 ` Michael Orlitzky
2016-06-05 7:23 ` J. García
2016-06-05 13:37 ` Michael Orlitzky [this message]
2016-06-05 14:31 ` Rich Freeman
2016-06-05 15:37 ` J. García
2016-06-05 15:44 ` J. García
2016-06-05 16:09 ` Michael Orlitzky
2016-06-05 16:27 ` J. García
2016-06-05 16:54 ` Michael Orlitzky
2016-06-07 9:23 ` Tom H
2016-06-06 22:17 ` Tom H
2016-06-06 22:04 ` Tom H
2016-06-06 22:59 ` Michael Orlitzky
2016-06-07 10:17 ` Tom H
2016-06-07 13:13 ` Michael Orlitzky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57542B1D.70103@gentoo.org \
--to=mjo@gentoo.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox