public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jacques Montier <jmontier@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Systemd query ...
Date: Tue, 16 May 2023 20:03:36 +0200	[thread overview]
Message-ID: <CAHVEG0Dp+ckxUhfiVYDfQY6wvCE6H=RzT+2x0zY=jmN4c9XHkw@mail.gmail.com> (raw)
In-Reply-To: <35990937-de1a-c417-09fa-952f269ad698@youngman.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]

Le lun. 15 mai 2023 à 11:58, Wols Lists <antlists@youngman.org.uk> a écrit :

> Nothing to do with but sparked by the Apache problem ...
>
> One of the emails mentioned that the "ExecStop" section didn't appear to
> be working ... That's caused me considerable grief in a systemd config
> file I've written ...
>
> Basically, somebody else added an ExecStop section - and all hell broke
> loose. It seemed to be firing on boot :-( And the service in question -
> ScarletDME - seemed to be killing processes at random, like DoveCot ...
>
> Okay, accidentally killing processes it shouldn't is probably down the
> fork/exec code in ScarletDME, I haven't dug into it to know, but systemd
> should not be triggering the stop in the first place. Has anybody else
> encountered anything like this?
>
> Sorry I'm not likely to respond quickly to say "solved", as I need to
> get "in the mood" to get back to debugging, but if anybody has any hints
> and tips, they'd be appreciated, and it might shed some light on that
> Apache problem :-)
>
> Cheers,
> Wol
>
>
Hi Wol,

It was very difficult to get Apache working with systemd Gentoo.
No apache2.service found with apache installation.
so i looked at the Linux Mint OS to copy the apache2.service.
These commands

ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl graceful-stop
ExecReload=/usr/sbin/apachectl graceful

did not work at all...
BUT,
By manually launching /usr/bin/apache2ctl, it  worked.

So i wrote a little simple bash script /usr/bin/op_apache

#!/bin/bash

case ${1} in
"start")
apache2ctl
;;
"stop")
killall apache2
;;
"restart")
killall apache2
sleep 1
apache2ctl
;;
esac

And in apache2.service, i put :

ExecStart=/usr/bin/op_apache start
ExecStop=/usr/bin/op_apache stop
ExecReload=/usr/sbin/op_apache restart

Now it works fine, but what a headache !

Cheers,

--
Jacques

[-- Attachment #2: Type: text/html, Size: 3146 bytes --]

  reply	other threads:[~2023-05-16 18:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15  9:58 [gentoo-user] Systemd query Wols Lists
2023-05-16 18:03 ` Jacques Montier [this message]
2023-05-16 18:58   ` Neil Bothwick
2023-05-16 19:32     ` Jacques Montier
2023-05-16 19:42       ` Rich Freeman
2023-05-17  8:43         ` Jacques Montier
2023-05-17  9:29           ` Rich Freeman
2023-05-17 10:18             ` Jacques Montier
2023-05-17 10:29               ` Rich Freeman
2023-05-17  0:41   ` David M. Fellows

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='CAHVEG0Dp+ckxUhfiVYDfQY6wvCE6H=RzT+2x0zY=jmN4c9XHkw@mail.gmail.com' \
    --to=jmontier@gmail.com \
    --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