Commit f4ed22ae authored by Axel Auweter's avatar Axel Auweter
Browse files

Get hostname for dcdbtools from DCDB_HOSTNAME environment variable if set.

parent 7071b1c4
......@@ -34,7 +34,11 @@ int main(int argc, char* argv[])
}
int ret;
const char *host = "localhost";
const char *host = getenv("DCDB_HOSTNAME");
if (!host) {
host = "localhost";
}
while ((ret=getopt(argc, argv, "+h:"))!=-1) {
switch(ret) {
case 'h':
......
......@@ -50,7 +50,11 @@ int main(int argc, char* argv[])
/* Get the options */
int ret;
const char *host = "localhost";
const char *host = getenv("DCDB_HOSTNAME");
if (!host) {
host = "localhost";
}
while ((ret=getopt(argc, argv, "+h:rlf"))!=-1) {
switch(ret) {
case 'h':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment