[Nagios-users] best expression of a timeperiod with same hours every day

2010-01-24 Thread Justin Pryzby
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

Re: [Nagios-users] best expression of a timeperiod with same hours every day

2010-01-24 Thread Martin Melin
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