<div dir="ltr">Thanks<div>I understand that <br><div>'systemctl isolate other.target' will stop all present services and start services of other.target</div></div><div><br></div><div>My thinking is :</div><div>I can put all my apps in my.target</div><div>and my.target can start after multi-user.target.</div><div><br></div><div>When shutting down , somewhere first i will do 'systemctl iso multi-user.target' so that all my services in my.target will stop.</div><div>but my understanding is this will stop my services with SIGTERM</div><div>but i want them to be killed with SIGKILL.</div><div>Is there a way to SIGKILL my services in my.target when i do 

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">'systemctl iso multi-user.target' (something equivalent to concept of  '

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">systemctl iso multi-user.target</span>


<span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">--signal=</span> SIGKILL 
' )<span>  ?</span></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><br></span></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span>Regards</span></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><br></span></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span><br></span></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 16, 2018 at 1:19 PM, Andrei Borzenkov <span dir="ltr"><<a href="mailto:arvidjaar@gmail.com" target="_blank">arvidjaar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">16.03.2018 10:19, aleivag пишет:<br>
<span class="">>><br>
>><br>
>> Won't work. Status changes only when job for a unit completes and jobs<br>
>> are executed in order of dependencies. Actually, jobs are *queued* in<br>
>> order of dependencies so nothing would indicate that you are going to<br>
>> shutdown until it is too late (i.e. all normal services are stopped).<br>
>><br>
>><br>
> yes, but those units have started, so during a `systemctl reboot` you can<br>
> execute<br>
><br>
> [~] systemctl list-jobs shutdown.target reboot.target<br>
>  JOB UNIT            TYPE  STATE<br>
> 1972 reboot.target   start waiting<br>
> 1974 shutdown.target start waiting<br>
><br>
> 2 jobs listed.<br>
><br>
> and get if shutdown has started<br>
><br>
<br>
</span>Yes, you are right. I'm sure I have seen cases when jobs were not<br>
present in other cases so I assumed it will be here as well.<br>
<span class=""><br>
> the other thing that may help you know if you are in shutdown mode is<br>
> execute `systemctl is-system-running`  and then check if returns `stopping`,<br>
> during a shutdown is suppose to return something like that. and i think it<br>
> does this by checking is shutdown.target has started (<br>
> <a href="https://github.com/systemd/systemd/blob/7a30dfeb18d09940a844389e06b25ca2bca5e093/src/core/manager.c#L3833-L3836" rel="noreferrer" target="_blank">https://github.com/systemd/<wbr>systemd/blob/<wbr>7a30dfeb18d09940a844389e06b25c<wbr>a2bca5e093/src/core/manager.c#<wbr>L3833-L3836</a><br>
> )<br>
><br>
<br>
</span>Yes, could be more reliable.<br>
<span class="im HOEnZb"><br>
><br>
> Logically runlevel is not changed until *after* new runlevel has been<br>
>> reached. Practically systemd does not update runlevel during shutdown at<br>
>> all.<br>
><br>
><br>
> yeap, you are right here, i was wrong :D<br>
><br>
<br>
</span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/systemd-devel</a><br>
</div></div></blockquote></div><br></div>