Is there a shorter way of expressing this? We have several cases
where we need this, with different intervals. I was hoping there was
a way of writing it in fewer than 10 lines each.
define timeperiod {
sunday 04:00-21:00
monday 04:00-21:00
tuesday
There is no way to avoid having one line per weekday in the config, but that
doesn't mean that you have to write the definitions out by hand :-) A quick
shellscript to echo each weekday with an argument and you should be good to
go. Here you go:
#!/bin/sh
echo sunday$1
echo monday