[mythtvnz] Database management

Paul paulgir at gmail.com
Sun Jul 25 05:01:33 BST 2021


On 25/07/21 3:51 pm, Stephen Worthington wrote:
> On Sun, 25 Jul 2021 11:45:51 +1200, you wrote:
>
>
>> Hi
>>
>> 'sudo systemctl edit fstrim.timer' created     /etc/systemd/system/fstrim.timer.d/override.conf
>>
>> The directory: '/fstrim.timer.d'     was created too, as it did not formerly exist.
>>
>> I copied the contents of:   '/lib/systemd/system/fstrim.timer' into the empty 'override.conf' file and  altered them as below:
>>
>> [Unit]
>> Description=Discard unused blocks once a day
>> Documentation=man:fstrim
>> ConditionVirtualization=!container
>>
>> [Timer]
>> OnCalendar=daily
>> AccuracySec=10m
>> Persistent=true
>>
>> [Install]
>> WantedBy=timers.target
>>
>>
>> Let me know if that's all ok.
>>
>> Thanks
>> Paul
> No, that is not the right way to do it.  Override files do as the name
> implies - any settings in an override file will override the matching
> setting in the base file.  So you do not copy the base file, just put
> only the settings you are changing into the override file.  So in this
> case, the override file should only contain just what I posted.
>
> There are some extra rules for override files to make them work
> properly.  Some settings can be used multiple times, so if you use
> such a setting in an override file, it will be added to the list of
> such settings that will be used.  For such settings, if you want to
> change existing settings in an override file, you have to tell systemd
> to delete all the existing settings of that name and then add back in
> the new ones that you want.  You do that by using a setting name with
> an = after it but nothing more on the line - that deletes all existing
> settings of that name.  Then after that line in the override file, you
> put your new settings.  So in my post, you will see the line
> "OnCalendar=", which deletes all the existing OnCalendar settings,
> followed by "OnCalendar=daily".  So only "OnCalendar=daily" will be
> use.  With what you have done, you have added the "OnCalendar=daily"
> setting to the existing "OnCalendar=weekly" setting, and now both will
> occur.  Which, fortunately, will not break anything, but is not ideal.
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz at lists.ourshack.com
> https://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/

Thanks Stephen

Correcting it now.

Cheers




More information about the mythtvnz mailing list