Re: non-existent unit instances

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 5, 2020 at 9:50 AM Michael Chapman <mike@xxxxxxxxxxxxxxxxx> wrote:
> Since the instance name for this unit is used to derive a configuration
> filename, a simple solution here would be to use:
>
>     ConditionPathExists=/etc/openvpn/client/%i.conf
>
> in the unit. Or, if you want the start job to fail when given a bad
> instance name:
>
>     AssertPathExists=/etc/openvpn/client/%i.conf

Thanks for this tip, this is very useful! I have a number of service
units which launch scripts and those scripts will fail if their
configuration files are not present; it will be handy to have the
start job itself fail in this situation.
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux