[systemd-devel] systemd kills user's scopes/sessions before shutdown service

Kamal Rathi kr30april at gmail.com
Mon Feb 24 14:36:17 UTC 2020


Hi team,

Any suggestions for the issue.

Regards,
Kamal Rathi


On Fri, Feb 21, 2020 at 8:09 AM Kamal Rathi <kr30april at gmail.com> wrote:

> Hi Team,
>
> The suggestion offered for design stop service was successfully
> integrated but the issue is still same as the User.slices still got kill.
>
> I am pasting my service here
>
> grep -v ^# /etc/systemd/system/stop.service
> [Unit]
> Description=Service to auto stop the EBS application
> After=user.slice
> [Service]
> ExecStart=
> ExecStop=/startdb/stop/stop.sh
> RemainAfterExit=true
> [Install]
> WantedBy=user.slice
>
>
> Now service runs but still issue is that I want my service to stop the
> processes not systemd
>
> Issue might be similar like this
>
> https://lists.freedesktop.org/archives/systemd-devel/2016-November/037916.html
>
>
> Regards,
> Kamal
>
> On Thu, Feb 20, 2020 at 10:15 PM Kamal Rathi <kr30april at gmail.com> wrote:
>
>> Hi Lennart,
>>
>> THe suggestion you have offered for design stop service was successfully
>> integrated but the issue is still same as the User session in User.slice
>> still got kill.
>>
>> I am pasting my service here
>>
>>
>> grep -v ^# /etc/systemd/system/stop.service
>> [Unit]
>> Description=Service to auto stop the EBS application
>> After=-.slice system.slice user.slice
>> [Service]
>> ExecStart=
>> ExecStop=/startdb/stop/stop.sh
>> RemainAfterExit=true
>> [Install]
>> WantedBy=user.slice
>>
>>
>> Now service runs but still issue is that I want my service to stop the
>> processes not systemd
>>
>> Issue might be similar like this
>>
>> https://lists.freedesktop.org/archives/systemd-devel/2016-November/037916.html
>>
>>
>> Regards,
>> Kamal
>>
>>
>>
>> On Thu, Jan 2, 2020 at 6:34 PM Lennart Poettering <lennart at poettering.net>
>> wrote:
>>
>>> On Di, 31.12.19 11:04, Kamal Rathi (kr30april at gmail.com) wrote:
>>>
>>> > Hi Git-Hub Mailing List,
>>> >
>>> > I am designing a stop service which has to be run before the kill of
>>> user's
>>> > scope / session .
>>>
>>> How could this work? Users can log out or be terminated any time,
>>> i.e. their scope/sessions can go away during runtime all the time, and
>>> they won't tell us beforehand about it beforehand, hence how could we
>>> run something beforehand?
>>>
>>> Lennart
>>>
>>> --
>>> Lennart Poettering, Berlin
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200224/4a8cdd6e/attachment.htm>


More information about the systemd-devel mailing list