Skip to content

Commit

Permalink
btrfsmaintenance-refresh-cron.sh: reset OnCalendar for generated drop…
Browse files Browse the repository at this point in the history
…-in files

Add an empty OnCalendar line to the generated drop-in conf file. This
fixes the linked issues where the default periods are used in addition
to any periods provided in the btrfsmaintenance config, which is not
what users expect.

See systemd.timer(5) why it needs to be reset.

Issue: #71
Issue: #91
Pull-request: #94
Author: David Wilkinson <davidmwilkinson@protonmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
davidmwilkinson authored and kdave committed Jul 21, 2021
1 parent be42cb6 commit 3d59509
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions btrfsmaintenance-refresh-cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ refresh_timer() {
mkdir -p /etc/systemd/system/"$SERVICE".timer.d/
cat << EOF > /etc/systemd/system/"$SERVICE".timer.d/schedule.conf
[Timer]
OnCalendar=
OnCalendar=$PERIOD
EOF
systemctl enable "$SERVICE".timer &> /dev/null
Expand Down

0 comments on commit 3d59509

Please sign in to comment.