[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can I use dollar sign in paths in monit config file?
From: |
Jan-Henrik Haukeland |
Subject: |
Re: Can I use dollar sign in paths in monit config file? |
Date: |
Thu, 21 Jun 2007 08:29:23 +0200 |
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