>Le lun. 15 mai 2023 à 11:58, Wols Lists <antli...@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.
>

On my gentoo system apache is installed in
/usr/sbin as apache2 and apache2ctl
     ^
It also installs /lib/systemd/system/apache2.service which references the
above files in a "gentoo-ish" way.

The Linux Mint service file you list above refers to apache without the "2".

Perhaps this shedd some light on your problem.

DaveF

>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
>

Reply via email to