[systemd-devel] Adding a Timer section to .service files
Michał Zegan
webczat_200 at poczta.onet.pl
Fri Jul 8 19:08:34 UTC 2016
the only reason to add such a thing at all is that making one file is
easier/faster. There is no other reason beside this one, so if it is not
considered a good one, then this feature is othervise useless. Also,
some time after proposing this I realized that it would be very easy to
implement what I say for new timer units, but you would need extra logic
to handle changing and reloading those timer units, or removing them
maybe, so hmm well, may be more complicated than I thought.
W dniu 08.07.2016 o 21:04, Andrei Borzenkov pisze:
> 08.07.2016 21:40, Michał Zegan пишет:
>> Well, I also came with another idea. of course if you do not want to
>> have two different ways to do one thing it is a stopper, but I will tell
>> about it for completeness as it may or may not be easier to implement.
>> Instead of creating a timer unit on service file installation or
>> something, you could have service and similar sections in the timer
>> unit, so the other way around. then, if service name is not explicitly
>> set in the unit and the service file with appropriate name does not
>> exist, it could just create it using information found in the timer unit
>> file, if such information can be found. The service file will be
>> generated in /run/systemd/system for example and it will work normally.
>
> So you just added one more step and end up in with exactlythe same - you
> have separate timer and service units. How is it an improvement? If you
> need to have separate service unit anyway, what advantage defining it
> somewhere else offers?
>
>> So, except the reason about not wanting to have two different ways of
>> doing one thing, it does not have other problems of the approach
>> mentioned first unless you also have another reasons not to generate
>> service units this way.
>>
>
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 510 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160708/14e0d767/attachment.sig>
More information about the systemd-devel
mailing list