Controlling the time of anacron's cron.daily in raspbian buster?

Feb 16, 2020 41 Replies

The .service files aren't config files. It's just that some packagers plunk hard-coded settings into the .service file when they should make them configurable. e.g. redhat/centos hardcode "PrivateTmp=true" into the .service file for apache httpd.

So instead of

[Service] ExecStart=/usr/sbin/mydaemon -s 03:00:00 PrivateTmp=true

It should be

[Service] EnvironmentFile=/etc/sysconfig/mydaemon ExecStart=/usr/sbin/mydaemon -s $STARTTIME PrivateTmp=$USEPRIVATETMP

Then all tweakable settings go in /etc/sysconfig/mydaemon instead of the .service file. (or /etc/default or whatever)

Well, I see what you mean, but if it has variables in it that I need to change to get the service to run at a different time or with different options, then it looks, walks, & quacks ike a config file to me!

;-)

Some say the world will end in fire; some say in segfaults.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required