On 6/20/07, Jan-Henrik Haukeland <address@hidden> wrote:
On 21. jun. 2007, at 07.53, Sergio Trejo wrote:
> I was wondering why it is illegal (according to monit when I run it
> on the command line with the -t (syntax check) option) to preface a
> path with $HOME, such as:
>
> set logfile $HOME/monit/my.log
>
> I guess monit doesn't parse $HOME and expand shell variables such
> as $HOME?
No monit does not expand shell variables in monitrc and as a reminder
does not allow $ in path names. Looks to me, a useful feature to add
or did we have this discussion before? I seem to recall we discussed
this and decided against.
> Any suggestions or work arounds?
Instead of $HOME/monit/my.log write for instance /home/sergtrejo/
monit/my.log :-)
If you absolutely must use shell variables, preprocess monitrc for
instance using something like
perl -pi -e 's,\$HOME,'$HOME',' .monitrc
Jan-Henrik
Thanks for clarifying this. I can write a simple Ruby script to pre-process quite easy.
Cheers,
Serg
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general