Hi<br><br>On Monday, November 24, 2014, D.S. Ljungmark <<a href="mailto:spider@aanstoot.se">spider@aanstoot.se</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 10/11/14 23:09, Lennart Poettering wrote:<br>
> On Thu, 30.10.14 18:47, D.S. Ljungmark (<a href="javascript:;" onclick="_e(event, 'cvml', 'spider@aanstoot.se')">spider@aanstoot.se</a>) wrote:<br>
><br>
>> Hi<br>
>>  we have a service set to:<br>
>> ConditionFileNotEmpty=<br>
>><br>
>> and<br>
>><br>
>> Restart=Always<br>
>><br>
>><br>
>> This combination would (in my feebled mind) cause the service to restart<br>
>> once the Condition was fulfilled, but that doesn't seem to be the<br>
>> case.<br>
><br>
> Conditions are something that are on-time evaluated right before we<br>
> would start a unit, and cause this starting to be shortcut. That's all<br>
> really. Restarts are only triggered when a running service dies, and<br>
> the start job queued by that will then check the conditions again. If<br>
> the condition doesn't hold then this start will not be executed, and<br>
> hence no restart ever again either...<br>
><br>
>> Is there a way I can get a service to restart even after it has been set<br>
>> as inactive (dead) "start condition failed"?<br>
><br>
> Nope, conditions are not for that. For the specific check of<br>
> file-not-empty there's no nice way to handle this, however for<br>
> directory-not-empty you could set up DirectoryNotEmpty=...<br>
><br>
>> Should I simply remove the Condition, or something else?<br>
><br>
> What precisely are you trying to do?<br>
><br>
> Lennart<br>
<br>
Basically, some files (config & certificates) may not exist on a system<br>
until it's provisioned properly, something that may take a while ( a few<br>
days)<br>
<br>
After provisioning, we want the services depending on those file to<br>
start automatically.</blockquote><div> </div><div>Path unit files should work for you,  <a href="http://www.freedesktop.org/software/systemd/man/systemd.path.html">http://www.freedesktop.org/software/systemd/man/systemd.path.html</a></div><div><br></div><div>Umut</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
//D.S.<br>
<br>
<br>
--<br>
8362 CB14 98AD 11EF CEB6  FA81 FCC3 7674 449E 3CFC<br>
<br>
</blockquote>