<div dir="ltr">Hi Lennart,<div><br></div><div>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.</div><div><br></div><div>I am pasting my service here </div><div><br></div><div><br></div><div>grep -v ^# /etc/systemd/system/stop.service<br>[Unit]<br>Description=Service to auto stop the EBS application<br>After=-.slice system.slice user.slice<br>[Service]<br>ExecStart=<br>ExecStop=/startdb/stop/stop.sh<br>RemainAfterExit=true<br>[Install]<br>WantedBy=user.slice<br></div><div><br></div><div><br></div><div>Now service runs but still issue is that I want my service to stop the processes not systemd</div><div><br></div><div>Issue might be similar like this </div><div><a href="https://lists.freedesktop.org/archives/systemd-devel/2016-November/037916.html">https://lists.freedesktop.org/archives/systemd-devel/2016-November/037916.html</a> </div><div><br></div><div>Regards,</div><div>Kamal <br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 2, 2020 at 6:34 PM Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Di, 31.12.19 11:04, Kamal Rathi (<a href="mailto:kr30april@gmail.com" target="_blank">kr30april@gmail.com</a>) wrote:<br>
<br>
> Hi Git-Hub Mailing List,<br>
><br>
> I am designing a stop service which has to be run before the kill of user's<br>
> scope / session .<br>
<br>
How could this work? Users can log out or be terminated any time,<br>
i.e. their scope/sessions can go away during runtime all the time, and<br>
they won't tell us beforehand about it beforehand, hence how could we<br>
run something beforehand?<br>
<br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Berlin<br>
</blockquote></div>