Forum Discussion
ramann_75062
Nimbostratus
Oct 29, 2009Export variables in external monitor script
Hi@all,
is there a way to export variables in a external bash monitor script and use then in the next run of the script?
I tried it via "export $BLA" but this doe...
hoolio
Cirrostratus
Oct 30, 2009Hi Bjoern,
Try searching online for "bash export environment variable" and you'll find plenty of references to the fact that a script can only modify the state of itself and its child processes--not the process that called the script:
http://www.linuxquestions.org/questions/linux-newbie-8/how-to-export-environment-variable-from-a-bash-script-344057/
I'm surprised to hear that you're not able to redirect output from the script to a file though. This should work. Many of the Codeshare external monitor scripts use this type of functionality to create a lock file and ensure only one instance of the script is running per pool member instance at a time.
That said, couldn't you write to /var/log/ltm and then use syslog to handle the emails?
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects