/usr/lib/systemd/system/mdcheck_start.timer has no symlink in /etc/systemd/system/. I want to change the start time from Sunday @0100 to Monday @0500.
I’ve been unable to locate a procedure to override a systemd default setting, where there is no related file or symlink present in /etc/systemd/system/. e.g., for mdcheck_start.timer:
# ls /etc/systemd/system/timers.target.wants/mdc*
ls: cannot access '/etc/systemd/system/timers.target.wants/mdc*': No such file or directory
# man mdcheck_start.timer
No manual entry for mdcheck_start.timer
#man /usr/lib/systemd/system/mdcheck_start.timer
(cat of the file)
This seems to be probably either an upstream documentation failure, or my incompetent as usual google-fu.
Do I copy that file and change the copy as desired, or symlink it and change it at either location, or use some systemctl or other command, so that my preference is not overridden by some package update or upgrade without obvious notification? Alternatively, in what documentation is this covered?
I meant to write unit file rather than config file in title, but couldn’t think of the word unit until after I gave up trying, plus more than 10 minutes. It would be nice if an admin would perform the edit and delete this otherwise useless “reply”.
Yes, copy to /etc/systemd/system/, edit as required, and it will take preference over the distribution-supplied unit file…
In addition to /etc/systemd/system, the drop-in “.d/” directories for system services can be placed in /usr/lib/systemd/system or /run/systemd/system directories. Drop-in files in /etc/ take precedence over those in /run/ which in turn take precedence over those in /usr/lib/. Drop-in files under any of these directories take precedence over unit files wherever located. Multiple drop-in files with different names are applied in lexicographic order, regardless of which of the directories they reside in.
More info
man systemd.unit
Do the following to create your custom version…
systemctl edit --full mdcheck_start.timer
It will save to /etc/systemd/system/, and you can then do