Mercurial > hg > anonet-resdb
comparison configure @ 12:41b330b11a33 draft
coded a tinydns datafile generator
author | Nick <nick@somerandomnick.ano> |
---|---|
date | Mon, 19 Apr 2010 06:10:07 +0000 |
parents | 8f9565400a0f |
children | b295bc1fe853 |
comparison
equal
deleted
inserted
replaced
11:2e7c94478881 | 12:41b330b11a33 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 vars="gitd_ip gitd_basepath" | 3 vars="gitd_ip gitd_basepath tinydns_config tinydns__tldsrvrname tinydns__tldsrvrip" |
4 | 4 |
5 echo "Welcome to the resdb configurator!" >&2 | 5 echo "Welcome to the resdb configurator!" >&2 |
6 echo >&2 | 6 echo >&2 |
7 | 7 |
8 for var in $vars ; do | 8 for var in $vars ; do |
9 export "$var"="$(cat conf/$var)" | 9 export "$var"="$(cat conf/$var 2>/dev/null)" |
10 done | 10 done |
11 if [ x"$gitd_basepath" = x ]; then | 11 if [ x"$gitd_basepath" = x ]; then |
12 gitd_basepath="$(pwd)/" | 12 gitd_basepath="$(pwd)/" |
13 fi | |
14 if [ x"$tinydns_config" = x ]; then | |
15 tinydns_config=n | |
16 fi | |
17 if [ x"$tinydns__tldsrvrname" = x ]; then | |
18 tinydns__tldsrvrname="uz5fvb7zdqyuz4q8ysjdfuf04kzd2lrt0l6fp4uyguxdg5tfut06ck.anons.somerandomnick.ano" | |
19 fi | |
20 if [ x"$tinydns__tldsrvrip" = x ]; then | |
21 tinydns__tldsrvrip="1.0.27.37" | |
13 fi | 22 fi |
14 | 23 |
15 echo "Please enter the IP address you'd like gitd to listen on." >&2 | 24 echo "Please enter the IP address you'd like gitd to listen on." >&2 |
16 echo "(Default: $gitd_ip)" >&2 | 25 echo "(Default: $gitd_ip)" >&2 |
17 echo -n "IP? " >&2 | 26 echo -n "IP? " >&2 |
26 read new_gitd_basepath | 35 read new_gitd_basepath |
27 if [ x"$new_gitd_basepath" != x ]; then | 36 if [ x"$new_gitd_basepath" != x ]; then |
28 gitd_basepath="$new_gitd_basepath" | 37 gitd_basepath="$new_gitd_basepath" |
29 fi | 38 fi |
30 | 39 |
40 echo -n "Would you like to configure the tinydns datafile generator? " >&2 | |
41 read new_tinydns_config | |
42 if [ x"$new_tinydns_config" != x ]; then | |
43 tinydns_config="$new_tinydns_config" | |
44 fi | |
45 if [ x"$tinydns_config" = xy ]; then | |
46 echo "Please enter the hostname of your .ano TLD server." >&2 | |
47 echo "(Default: $tinydns__tldsrvrname)" >&2 | |
48 echo -n "TLDSrvName? " >&2 | |
49 read new_tinydns__tldsrvrname | |
50 if [ x"$new_tinydns__tldsrvrname" != x ]; then | |
51 tinydns__tldsrvrname="$new_tinydns__tldsrvrname" | |
52 fi | |
53 | |
54 echo "Please enter the IP address of your .ano TLD server." >&2 | |
55 echo "(Default: $tinydns__tldsrvrip)" >&2 | |
56 echo -n "TLDSrvIP? " >&2 | |
57 read new_tinydns__tldsrvrip | |
58 if [ x"$new_tinydns__tldsrvrip" != x ]; then | |
59 tinydns__tldsrvrip="$new_tinydns__tldsrvrip" | |
60 fi | |
61 fi | |
62 | |
31 echo "Proposed configuration:" >&2 | 63 echo "Proposed configuration:" >&2 |
32 for var in $vars ; do | 64 for var in $vars ; do |
33 echo "$var=${!var}" >&2 | 65 echo "$var=${!var}" >&2 |
34 done | 66 done |
35 echo -n "To write the configuration, hit RETURN. To abort, hit ^C: " >&2 | 67 echo -n "To write the configuration, hit RETURN. To abort, hit ^C: " >&2 |