[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
editfiles SetScript & RunScript?
From: |
Steve Wray |
Subject: |
editfiles SetScript & RunScript? |
Date: |
Thu, 6 May 2004 15:59:30 +1200 |
User-agent: |
KMail/1.6.1 |
Hi there,
with the editfiles SetScript action, does the script need to be in some
specific location or can I indicate the full path in the quoted string?
So far I havn't been able to get a script to run at all...
eg;
editfiles:
{ /home/testdir/testfile
SetScript "/usr/local/bin/testscript.sh"
RunScriptIfLineMatching "first"
}
where /usr/local/bin/testscript.sh
is;
<script>
#!/bin/bash
sed /home/testdir/testfile -e 's/\(first\) \(second\) \(third\)/\3 \2 \1/' >
/tmp/tmptext
cp /tmp/tmptext /home/testdir/testfile
</script>
and /home/testdir/testfile contains only;
<filecontent>
first second third
</filecontent>
The script runs correctly from the commandline but never gets run at all from
cfagent;
the /tmp file does not get created.
- editfiles SetScript & RunScript?,
Steve Wray <=