I use this in my shell scripties:
if [ "`hostname --domain 2>/dev/null`" = "toolserver.org" ]; then echo on cluster else echo off cluster fi
-Darren
-- Darren Hardy Ph.D. Candidate Bren School of Environmental Science & Management University of California, Santa Barbara http://www.bren.ucsb.edu/~dhardy dhardy@bren.ucsb.edu
On 2 Sep 2009, at 5:39 AM, Tim Landscheidt wrote:
Hi,
is there any reliable way to determine if a script is run in the toolserver cluster, i. e. can make use of the database servers & Co., without checking for hostname being wolfs- bane, nightshade or names-to-come?
TIA, Tim
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette