[Toolserver-l] How to determine if script runs in the toolserver cluster?
Darren R. Hardy
dhardy at bren.ucsb.edu
Wed Sep 2 17:02:02 UTC 2009
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 at 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 at lists.wikimedia.org)
> https://lists.wikimedia.org/mailman/listinfo/toolserver-l
> Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette
More information about the Toolserver-l
mailing list