What directory are you running this script from? There may be relative references in those scripts.
On Thursday, December 18, 2014, Darian Jimenez darian929@gmail.com wrote:
Hello,
I have a quick simple script to go through a text file and add_device, discovery it and poll it. However the only portion that works fine is the add_device.
the discovery nor poller.php is actually doing what it should. however If I run the command separately outside of the script it discovers the device as well as polls it.
the host name is right because I'm using echo within the script to show the name for each loop.
If i use ./disocvery.php -h new that works fine and I guess it's a work around, however ./poller.php -h new does not work.
below is the script I'm running.
while read host do echo $host /opt/observium/add_device.php $host /opt/observium/discovery.php -h $host /opt/observium/poller.php -h $host done < Servers/dailyserverlist.txt