annotate contrib/peer2anonet/peer2anonet @ 1048:c3e4b6c83537 draft

[scripts/git-config] change <name> <email>
author d3v11 <d3v11@d3v11.ano>
date Tue, 30 Oct 2012 05:48:41 +0000
parents b211722679fb
children 5ec278277aa4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
1 #!/bin/bash
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
2 if [[ $(id -u) != 0 ]]; then
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
3 echo "peer2anonet: root privileges required."
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
4 exit 1
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
5 fi
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
6
777
b13bf8dc2c0c updated peer2anonet stuff
d3v11 <d3v11@d3v11.ano>
parents: 775
diff changeset
7 if [ -e /services/bird ]; then
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
8 [ -e /etc/peer2anonet/bird.tar ] || ( cd /services ; echo "creating /etc/peer2anonet/bird.tar backup" ;\
796
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
9 tar cf /etc/peer2anonet/bird.tar bird )
777
b13bf8dc2c0c updated peer2anonet stuff
d3v11 <d3v11@d3v11.ano>
parents: 775
diff changeset
10 fi
b13bf8dc2c0c updated peer2anonet stuff
d3v11 <d3v11@d3v11.ano>
parents: 775
diff changeset
11
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
12 [ -e contrib/peer2anonet/peer2anonet ] || echo "peer2anonet: not in \$RESDB_ROOT"
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
13 [ -e contrib/peer2anonet/peer2anonet ] || exit 1
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
14
884
cd9d07046b1c peer2anonet:
d3v11 <d3v11@d3v11.ano>
parents: 883
diff changeset
15 [ -w /etc/rc.local ] && chmod +x /etc/rc.local
cd9d07046b1c peer2anonet:
d3v11 <d3v11@d3v11.ano>
parents: 883
diff changeset
16 [ -w /etc/rc.d/rc.local ] && chmod +x /etc/rc.d/rc.local
cd9d07046b1c peer2anonet:
d3v11 <d3v11@d3v11.ano>
parents: 883
diff changeset
17
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
18 USAGE(){
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
19 echo -e '\npeer2anonet:'
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
20 echo -e '\n ./contrib/peer2anonet/peer2anonet --configure generate a new local configuration and exit'
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
21 echo -e '\n ./contrib/peer2anonet/peer2anonet --update regenerate peer configurations'
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
22 echo -e '\n ./contrib/peer2anonet/peer2anonet --configure-peer generate a new peer configuration and update'
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
23 echo -e '\n ./contrib/peer2anonet/peer2anonet --rm-peer remove a peer configuration and update'
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
24 echo -e '\n ./contrib/peer2anonet/peer2anonet --install-daemontools installs daemontools'
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
25 echo -e '\n ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp installs ucspi-tcp'
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
26 echo -e '\n ./contrib/peer2anonet/peer2anonet --install-djbdns installs djbdns'
870
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
27 echo -e '\n ./contrib/peer2anonet/peer2anonet --install-nacl installs nacl'
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
28 echo -e '\n ./contrib/peer2anonet/peer2anonet --setup-qmail installs and configures qmail'
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
29 echo -e '\n ./contrib/peer2anonet/peer2anonet --configure-dns configures dnscache and tinydns zones'
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
30 echo -e '\n ./contrib/peer2anonet/peer2anonet --update-dns updates tinydns-ano zone\n'
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
31 exit 0
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
32 }
550
4964136d5043 peer2anonet: added configuration on install to create env variables. see README for details.
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents: 549
diff changeset
33
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
34 mkdir -p /service
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
35 mkdir -p /services
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
36 mkdir -p /services/bird
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
37 mkdir -p /etc/peer2anonet
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
38 mkdir -p /etc/peer2anonet/peers
537
8e8a01a680b4 peer2anonet changes made:
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents: 535
diff changeset
39
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
40 CONFIGURE(){
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
41 echo -e '\nCONFIGURE:\n'
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
42 read -p " Enter your AnoNet subnet: " P2A_NET
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
43 read -p " Enter your AnoNet router: " P2A_ROUTE
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
44 read -p " Enter your peering ip: " P2A_IP
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
45 read -p " Enter your AnoNet asn: " P2A_ASN
782
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
46
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
47
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
48 echo "P2A_NET=\"$P2A_NET\"">/etc/peer2anonet/p2a.conf
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
49 echo "P2A_ROUTE=\"$P2A_ROUTE\"">>/etc/peer2anonet/p2a.conf
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
50 echo "P2A_IP=\"$P2A_IP\"">>/etc/peer2anonet/p2a.conf
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
51 echo "P2A_ASN=\"$P2A_ASN\"">>/etc/peer2anonet/p2a.conf
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
52 echo -e '\npeer2anonet: configured\n'
782
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
53
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
54 NICK=`cat conf/git_name`
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
55 ./scripts/add_as $P2A_ASN $NICK
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
56 ./scripts/add_ip $P2A_NET/24 $NICK
875
1f90d90584a0 added db/usr/$NICK/git|email to --configure
d3v11 <d3v11@d3v11.ano>
parents: 871
diff changeset
57 [ -e "db/usr/$NICK" ] || mkdir -p "db/usr/$NICK"
1f90d90584a0 added db/usr/$NICK/git|email to --configure
d3v11 <d3v11@d3v11.ano>
parents: 871
diff changeset
58 [ -e "db/usr/$NICK/git" ] || echo "git://git.$NICK.ano/">"db/usr/$NICK/git"
1f90d90584a0 added db/usr/$NICK/git|email to --configure
d3v11 <d3v11@d3v11.ano>
parents: 871
diff changeset
59 [ -e "db/usr/$NICK/email" ] || echo "`cat conf/git_email`">"db/usr/$NICK/email"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
60 exit 0
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
61 }
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
62
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
63 UPDATE(){
782
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
64 if [ -e /etc/peer2anonet/p2a.conf ]; then
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
65 source /etc/peer2anonet/p2a.conf
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
66 else
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
67 CONFIGURE
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
68 exit 0
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
69 fi
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
70
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
71 echo -e '\nUPDATE:\n'
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
72 if [[ $(ls /etc/peer2anonet/peers) ]]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
73 for PEER in `ls /etc/peer2anonet/peers`; do
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
74 if [ -e /etc/peer2anonet/peers/"$PEER"/remote_ip ]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
75 if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/remote_ip`) == 'X' ]]; then
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
76 echo " fatal error: /etc/peer2anonet/peers/$PEER/remote_ip is void"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
77 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
78 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
79 else
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
80 echo " fatal error: /etc/peer2anonet/peers/$PEER/remote_ip not exists"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
81 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
82 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
83
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
84 if [ -e /etc/peer2anonet/peers/"$PEER"/peering_ip ]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
85 if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/peering_ip`) == 'X' ]]; then
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
86 echo " fatal error: /etc/peer2anonet/peers/$PEER/peering_ip is void"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
87 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
88 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
89 else
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
90 echo " fatal error: /etc/peer2anonet/peers/$PEER/peering_ip not exists"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
91 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
92 fi
583
f5ec84b7d825 restored old resdb from srn and added new changes for tinydns, my git domain, and peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 559
diff changeset
93
803
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
94 if [ -e /etc/peer2anonet/peers/"$PEER"/remote_port ]; then
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
95 if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/remote_port`) == 'X' ]]; then
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
96 echo " fatal error: /etc/peer2anonet/peers/$PEER/remote_port is void"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
97 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
98 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
99 else
803
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
100 echo " fatal error: /etc/peer2anonet/peers/$PEER/remote_port not exists"
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
101 exit 1
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
102 fi
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
103
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
104 if [ -e /etc/peer2anonet/peers/"$PEER"/local_port ]; then
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
105 if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/local_port`) == 'X' ]]; then
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
106 echo " fatal error: /etc/peer2anonet/peers/$PEER/local_port is void"
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
107 exit 1
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
108 fi
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
109 else
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
110 echo " fatal error: /etc/peer2anonet/peers/$PEER/local_port not exists"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
111 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
112 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
113
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
114 if [ -e /etc/peer2anonet/peers/"$PEER"/asn ]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
115 if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/asn`) == 'X' ]]; then
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
116 echo " fatal error: /etc/peer2anonet/peers/$PEER/asn is void"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
117 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
118 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
119 else
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
120 echo " fatal error: /etc/peer2anonet/peers/$PEER/asn not exists"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
121 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
122 fi
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
123
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
124 if [ -e /etc/peer2anonet/peers/"$PEER"/pubkey ]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
125 if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/pubkey`) == 'X' ]]; then
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
126 echo " fatal error: /etc/peer2anonet/peers/$PEER/pubkey is void"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
127 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
128 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
129 else
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
130 echo " fatal error: /etc/peer2anonet/peers/$PEER/pubkey not exists"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
131 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
132 fi
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
133
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
134 if [ -e /etc/peer2anonet/peers/"$PEER"/seckey ]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
135 if [[ $(echo X`cat /etc/peer2anonet/peers/"$PEER"/seckey`) == 'X' ]]; then
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
136 echo " fatal error: /etc/peer2anonet/peers/$PEER/seckey is void"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
137 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
138 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
139 else
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
140 echo " fatal error: /etc/peer2anonet/peers/$PEER/seckey not exists"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
141 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
142 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
143 done
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
144 else
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
145 echo " fatal error: peering configurations not exists"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
146 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
147 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
148
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
149 echo '#!/bin/bash
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
150 bird -c bird.conf -d' > /services/bird/run
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
151 chmod +x /services/bird/run
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
152
829
3750fcc21c33 updates to peer2anonet, added "static bird"
d3v11 <d3v11@d3v11.ano>
parents: 806
diff changeset
153 if [ -e /etc/peer2anonet/bird.conf ]; then
3750fcc21c33 updates to peer2anonet, added "static bird"
d3v11 <d3v11@d3v11.ano>
parents: 806
diff changeset
154 cp /etc/peer2anonet/bird.conf /services/bird/bird.conf
3750fcc21c33 updates to peer2anonet, added "static bird"
d3v11 <d3v11@d3v11.ano>
parents: 806
diff changeset
155 else
3750fcc21c33 updates to peer2anonet, added "static bird"
d3v11 <d3v11@d3v11.ano>
parents: 806
diff changeset
156 echo "function n_AnoNet_mine (prefix arg) {
550
4964136d5043 peer2anonet: added configuration on install to create env variables. see README for details.
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents: 549
diff changeset
157 if arg ~ [ $P2A_NET/24+ ] then return true;
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
158 return false; };
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
159
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
160 function n_AnoNet (prefix arg) {
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
161 if arg ~ [ 1.0.0.0/8+ ] then return true;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
162 return false; };
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
163
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
164 filter only_AnoNet_ebgp {
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
165 if n_AnoNet(net) then
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
166 if !n_AnoNet_mine(net) then
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
167 accept \"AnoNet\";
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
168 else reject \"mine\";
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
169 reject \"non-AnoNet\"; };
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
170
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
171 filter only_AnoNet_ebgp_export {
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
172 if n_AnoNet(net) then accept \"AnoNet\";
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
173 reject \"non-AnoNet\"; };
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
174
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
175 filter only_AnoNet {
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
176 if n_AnoNet(net) then accept \"AnoNet\";
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
177 reject \"non-AnoNet\"; };
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
178
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
179 table AnoNet_routes;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
180
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
181 protocol pipe pipe_AnoNet_routes { peer table AnoNet_routes; mode transparent;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
182 import filter only_AnoNet;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
183 export filter only_AnoNet;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
184 };
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
185
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
186 protocol static static_AnoNet_routes { table AnoNet_routes;
583
f5ec84b7d825 restored old resdb from srn and added new changes for tinydns, my git domain, and peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 559
diff changeset
187 route $P2A_NET/24 drop;
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
188 }
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
189
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
190 protocol kernel {
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
191 scan time 10;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
192 import all;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
193 export all;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
194 }
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
195
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
196 protocol device {
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
197 scan time 900;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
198 }
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
199
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
200 protocol direct direct_AnoNet_routes { table AnoNet_routes;
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
201 interface \"eth0\";
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
202 import filter only_AnoNet;
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
203 }" > /services/bird/bird.conf
829
3750fcc21c33 updates to peer2anonet, added "static bird"
d3v11 <d3v11@d3v11.ano>
parents: 806
diff changeset
204 fi
537
8e8a01a680b4 peer2anonet changes made:
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents: 535
diff changeset
205
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
206 for PEER in `ls /etc/peer2anonet/peers`; do
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
207 mkdir -p /services/"$PEER"
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
208 REMOTEIP=`cat /etc/peer2anonet/peers/"$PEER"/remote_ip`
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
209 PEERIP=`cat /etc/peer2anonet/peers/"$PEER"/peering_ip`
803
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
210 PEERPORT=`cat /etc/peer2anonet/peers/"$PEER"/remote_port`
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
211 LOCALPORT=`cat /etc/peer2anonet/peers/"$PEER"/local_port`
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
212 PEERASN=`cat /etc/peer2anonet/peers/"$PEER"/asn`
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
213 PUBKEY=`cat /etc/peer2anonet/peers/"$PEER"/pubkey`
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
214 SECKEY=`cat /etc/peer2anonet/peers/"$PEER"/seckey`
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
215
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
216 echo "
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
217 protocol bgp $PEER { table AnoNet_routes;
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
218 local as $P2A_ASN;
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
219 neighbor $PEERIP as $PEERASN;
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
220 source address $P2A_IP;
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
221 import filter only_AnoNet_ebgp;
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
222 export filter only_AnoNet_ebgp_export;
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
223 }" >> /services/bird/bird.conf
537
8e8a01a680b4 peer2anonet changes made:
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents: 535
diff changeset
224
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
225 if [ -e /etc/peer2anonet/peers/"$PEER"/run ]; then
1032
b3f81bd4309d [contrib/peer2anonet/peer2anonet] cp bugfix
d3v11 <d3v11@d3v11.ano>
parents: 1028
diff changeset
226 test -L /services/"$PEER"/run || rm -f /services/"$PEER"/run
b3f81bd4309d [contrib/peer2anonet/peer2anonet] cp bugfix
d3v11 <d3v11@d3v11.ano>
parents: 1028
diff changeset
227 test -L /services/"$PEER"/run || ln -s /etc/peer2anonet/peers/"$PEER"/run /services/"$PEER"/run
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
228 else
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
229 echo "#!/bin/bash
726
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
230
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
231 # uncomment for debugging. you'll need to use ./run to view output instead
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
232 # of svc -u /service/<peer name>
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
233 #
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
234 #export DEBUG=1
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
235
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
236 # uncomment if your peer has a dynamic IP
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
237 #
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
238 #export REMOTE_FLOAT=1
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
239
1028
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
240 if [[ \$REMOTE_FLOAT != 1 ]]; then
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
241 export REMOTE_ADDRESS=\`cat /etc/peer2anonet/peers/$PEER/remote_ip\`
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
242 export REMOTE_PORT=\`cat /etc/peer2anonet/peers/$PEER/remote_port\`
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
243 fi
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
244
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
245 # not recommended to change these values
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
246 #
1028
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
247 export LOCAL_PORT=\`cat /etc/peer2anonet/peers/$PEER/local_port\`
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
248 export PRIVATE_KEY=\`cat /etc/peer2anonet/peers/$PEER/seckey\`
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
249 export PUBLIC_KEY=\`cat /etc/peer2anonet/peers/$PEER/pubkey\`
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
250 export TUN_MODE=1
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
251 export INTERFACE=ppp-$PEER
726
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
252
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
253 # uncomment if you want to nuke your default gateway and configure
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
254 # routes only to peers through IcannNet. If any of your peers use
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
255 # dynamic IP's or you use Tor or i2p then this is probably NOT a
727
3138e320dc47 Peer2AnoNet updated: made changes to ./run configuration and included
d3v11 <d3v11@d3v11.ano>
parents: 726
diff changeset
256 # good idea. You may need to modify the DEFAULT_ROUTE code below.
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
257 # If you run into problems with this please /msg /relayhell/d3v11
727
3138e320dc47 Peer2AnoNet updated: made changes to ./run configuration and included
d3v11 <d3v11@d3v11.ano>
parents: 726
diff changeset
258 # so I can create a patch.
726
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
259 #
729
e8d1fe231dc3 peer2anonet bug(s) fixed with new /service*/<peername>/run configurations
d3v11 <d3v11@d3v11.ano>
parents: 728
diff changeset
260 #DEFAULT_ROUTE=\`ip route show | grep default | cut -d' ' -f 3\`
e8d1fe231dc3 peer2anonet bug(s) fixed with new /service*/<peername>/run configurations
d3v11 <d3v11@d3v11.ano>
parents: 728
diff changeset
261 #route del default gw \$DEFAULT_ROUTE
e8d1fe231dc3 peer2anonet bug(s) fixed with new /service*/<peername>/run configurations
d3v11 <d3v11@d3v11.ano>
parents: 728
diff changeset
262 #route add \$REMOTE_ADDRESS gw \$DEFAULT_ROUTE
726
2d916fa935e6 Peer2AnoNet updated
d3v11 <d3v11@d3v11.ano>
parents: 668
diff changeset
263
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
264 ( sleep 5;
1028
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
265 ip addr add $P2A_IP peer \`cat /etc/peer2anonet/peers/$PEER/peering_ip\`/32 dev \$INTERFACE scope link
550
4964136d5043 peer2anonet: added configuration on install to create env variables. see README for details.
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents: 549
diff changeset
266 ip addr add $P2A_ROUTE/32 dev \$INTERFACE scope global
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
267 ip link set dev \$INTERFACE up
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
268
731
3e088515f092 peer2anonet update
d3v11 <d3v11@d3v11.ano>
parents: 730
diff changeset
269 # comment the following ping line to remove pinghack. this is a
3e088515f092 peer2anonet update
d3v11 <d3v11@d3v11.ano>
parents: 730
diff changeset
270 # trick used to help bird connect.
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
271 #
1028
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
272 ping -c 1 -I \$INTERFACE \`cat /etc/peer2anonet/peers/$PEER/peering_ip\` -r -w 5
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
273
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
274 ) &
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
275 exec /usr/sbin/quicktun.nacltai" > /etc/peer2anonet/peers/$PEER/run
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
276 fi
1028
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
277 chmod +x /etc/peer2anonet/peers/"$PEER"/run
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
278 test -L /services/"$PEER"/run || rm -f /services/"$PEER"/run
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
279 test -L /services/"$PEER"/run || ln -s /etc/peer2anonet/peers/"$PEER"/run /services/"$PEER"/run
8e301584fd93 [contrib/peer2anonet/peer2anonet] /service/$peer/run == symlink /etc/peer2anonet/peers/$peer/run; /service/$peer/run will now read from /etc/peer2anonet/peers/$peer/<env files>; more simple toggle for REMOTE_FLOAT
d3v11 <d3v11@d3v11.ano>
parents: 1027
diff changeset
280 test -L "/service/$PEER" && svc -t "/service/$PEER"
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
281 test -L "/service/$PEER" || ln -s "/services/$PEER" "/service/$PEER"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
282 done
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
283 test -L /service/bird || ln -s /services/bird /service/bird
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
284 echo configure | birdc
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
285 }
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
286
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
287 CONFIGURE_PEER(){
782
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
288 if [ -e /etc/peer2anonet/p2a.conf ]; then
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
289 source /etc/peer2anonet/p2a.conf
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
290 else
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
291 CONFIGURE
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
292 exit 0
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
293 fi
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
294
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
295 echo -e '\nCONFIGURE PEER:\n'
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
296 read -p " Enter your peer's name: " PEER
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
297 read -p " Enter your peer's remote ip: " REMOTEIP
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
298 read -p " Enter your peer's peering ip: " PEERIP
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
299 read -p " Enter your peer's remote port: " PEERPORT
803
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
300 read -p " Enter your local port: " LOCALPORT
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
301 read -p " Enter your peer's asn: " PEERASN
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
302 read -p " Enter your peer's public key: " PUBKEY
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
303 read -p " Enter your private key: " SECKEY
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
304 [ -e /etc/peer2anonet/peers/"$PEER" ] && rm -r /etc/peer2anonet/peers/"$PEER"
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
305 mkdir -p /etc/peer2anonet/peers/"$PEER"
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
306 echo $REMOTEIP >/etc/peer2anonet/peers/"$PEER"/remote_ip
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
307 echo $PEERIP >/etc/peer2anonet/peers/"$PEER"/peering_ip
806
bdfcbc45bd9e bugfix for peer2anonet --configure-peer
d3v11 <d3v11@d3v11.ano>
parents: 804
diff changeset
308 echo $PEERPORT >/etc/peer2anonet/peers/"$PEER"/remote_port
803
3761c3e87765 peer2anonet now asks for the local port
d3v11 <d3v11@d3v11.ano>
parents: 801
diff changeset
309 echo $LOCALPORT >/etc/peer2anonet/peers/"$PEER"/local_port
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
310 echo $PEERASN >/etc/peer2anonet/peers/"$PEER"/asn
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
311 echo $PUBKEY >/etc/peer2anonet/peers/"$PEER"/pubkey
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
312 echo $SECKEY >/etc/peer2anonet/peers/"$PEER"/seckey
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
313 echo -e "\n configured $PEER\n"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
314 }
535
5965e074d13a added peer2anonet: autoconfig tool for easily setting up peering and bgp on anonet using quicktun, bird, and daemontools
d3v1150m471c <d3v11@d3v1150m471c.ano>
parents:
diff changeset
315
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
316 RM_PEER(){
782
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
317 if [ -e /etc/peer2anonet/p2a.conf ]; then
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
318 source /etc/peer2anonet/p2a.conf
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
319 else
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
320 CONFIGURE
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
321 exit 0
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
322 fi
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
323
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
324 echo -e '\nRM PEER:\n'
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
325 read -p " Enter your peer's name: " PEER
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
326 if [ -e /etc/peer2anonet/peers/"$PEER" ]; then
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
327 rm -r /etc/peer2anonet/peers/"$PEER"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
328 echo
772
1ba55b415d50 update peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 771
diff changeset
329 echo -e " removed /etc/peer2anonet/peers/$PEER\n"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
330 else
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
331 echo
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
332 echo -e " fatal error: /etc/peer2anonet/peers/$PEER not exists\n"
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
333 exit 1
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
334 fi
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
335 }
625
ad10fd05ee0e modified contrib/peer2anonet/peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 624
diff changeset
336
773
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
337 INSTALL_DAEMONTOOLS(){
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
338 echo -e '\nINSTALL DAEMONTOOLS:\n'
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
339 [[ $(echo X`which gcc`) == X ]] && echo ' fatal error: cannot find gcc'
773
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
340 [[ $(echo X`which gcc`) == X ]] && exit 1
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
341 [[ $(echo X`which make`) == X ]] && echo ' fatal error: cannot find make'
773
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
342 [[ $(echo X`which make`) == X ]] && exit 1
882
e26b88d9df75 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 881
diff changeset
343
e26b88d9df75 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 881
diff changeset
344 if [ -w /etc/inittab ]; then :
e26b88d9df75 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 881
diff changeset
345 elif [ -w /etc/rc.local ] && ! [ -w /etc/inittab ]; then
951
1ec03f851ccf can use exec instead of csh for --install-daemontools. thanks AP :-)
d3v11 <d3v11@d3v11.ano>
parents: 908
diff changeset
346 sed -i "s/exit 0/exec \/command\/svscanboot \&/" /etc/rc.local
882
e26b88d9df75 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 881
diff changeset
347 chmod +x /etc/rc.local
e26b88d9df75 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 881
diff changeset
348 else
e26b88d9df75 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 881
diff changeset
349 echo ' fatal error: cannot create reliable startup'
e26b88d9df75 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 881
diff changeset
350 exit 1
e26b88d9df75 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 881
diff changeset
351 fi
e26b88d9df75 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 881
diff changeset
352
773
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
353 mkdir -p /package
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
354 chmod 1755 /package
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
355 cd /package
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
356 wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
357 gunzip daemontools-0.76.tar
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
358 tar -xpf daemontools-0.76.tar
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
359 rm -f daemontools-0.76.tar
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
360 cd admin/daemontools-0.76
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
361 sed -i 's/gcc/gcc -include errno.h/g' src/conf-cc
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
362 package/install
951
1ec03f851ccf can use exec instead of csh for --install-daemontools. thanks AP :-)
d3v11 <d3v11@d3v11.ano>
parents: 908
diff changeset
363 exec /command/svscanboot >/dev/null 2>&1 &
773
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
364 }
e771b7217646 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 772
diff changeset
365
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
366 INSTALL_UCSPI_TCP(){
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
367 echo -e '\nINSTALL UCSPI-TCP:\n'
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
368 [[ $(echo X`which gcc`) == X ]] && echo ' fatal error: cannot find gcc'
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
369 [[ $(echo X`which gcc`) == X ]] && exit 1
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
370 [[ $(echo X`which make`) == X ]] && echo ' fatal error: cannot find make'
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
371 [[ $(echo X`which make`) == X ]] && exit 1
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
372 cd /usr/local/src
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
373 wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
374 gunzip ucspi-tcp-0.88.tar
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
375 tar -xf ucspi-tcp-0.88.tar
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
376 cd ucspi-tcp-0.88
783
0c6f45e85a7d peer2anonet ucspi-tcp conf-cc bug fix
d3v11 <d3v11@d3v11.ano>
parents: 782
diff changeset
377 sed -i 's/gcc/gcc -include errno.h/g' conf-cc
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
378 make
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
379 make setup check
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
380 }
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
381
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
382 SETUP_QMAIL(){
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
383 echo -e '\nSETUP QMAIL:\n'
906
8565acc59908 added user warning for qmail
d3v11 <d3v11@d3v11.ano>
parents: 905
diff changeset
384
8565acc59908 added user warning for qmail
d3v11 <d3v11@d3v11.ano>
parents: 905
diff changeset
385 echo -e '\tWARN:\n'
8565acc59908 added user warning for qmail
d3v11 <d3v11@d3v11.ano>
parents: 905
diff changeset
386 echo -e '\tYou should patch or firewall off qmail from'
8565acc59908 added user warning for qmail
d3v11 <d3v11@d3v11.ano>
parents: 905
diff changeset
387 echo -e '\treaching IcannNet so someone cannot harvest'
8565acc59908 added user warning for qmail
d3v11 <d3v11@d3v11.ano>
parents: 905
diff changeset
388 echo -e '\tyour IP with the mailerdaemon response.'
8565acc59908 added user warning for qmail
d3v11 <d3v11@d3v11.ano>
parents: 905
diff changeset
389
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
390 [[ $(echo X`which gcc`) == X ]] && echo ' fatal error: cannot find gcc'
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
391 [[ $(echo X`which gcc`) == X ]] && exit 1
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
392 [[ $(echo X`which make`) == X ]] && echo ' fatal error: cannot find make'
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
393 [[ $(echo X`which make`) == X ]] && exit 1
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
394 [[ $(echo X`which tcpserver`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp'
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
395 [[ $(echo X`which tcpserver`) == X ]] && exit 1
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
396 [[ $(echo X`which svscanboot`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-daemontools'
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
397 [[ $(echo X`which svscanboot`) == X ]] && exit 1
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
398
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
399 NICK=`cat conf/git_name` || exit 1
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
400 MX_IP=`cat conf/gitd_ip` || exit 1
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
401 MX_DOMAIN="a.mx.$NICK.ano" || exit 1
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
402
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
403 if [ -e /services/tinydns ]; then
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
404 (
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
405 cd /services
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
406 echo "creating /etc/peer2anonet/tinydns.tar backup"
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
407 tar cf /etc/peer2anonet/tinydns.tar tinydns
904
10a4ea42b757 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 903
diff changeset
408 echo "@$NICK.ano:$MX_IP:a:12801:86400">>/services/tinydns/root/data
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
409 )
904
10a4ea42b757 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 903
diff changeset
410 else
905
af399d79c0b8 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 904
diff changeset
411 echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --configure-dns'
904
10a4ea42b757 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 903
diff changeset
412 exit 1
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
413 fi
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
414
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
415 (
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
416 cd /services/tinydns/root
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
417 make
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
418 cd /service
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
419 sleep 5
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
420 svc -t dnscache tinydns tinydns-ano tinydns-root
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
421 )
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
422
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
423 useradd qmaillog || exit 1
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
424
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
425 if [ -w /etc/rc.local ]; then
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
426 if [[ $(cat /etc/rc.local) != *"ip addr add $MX_IP/32 dev lo &"* ]]; then
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
427 echo "ip addr add $MX_IP/32 dev lo &" >> /etc/rc.local
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
428 fi
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
429 elif [ -w /etc/rc.d/rc.local ]; then
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
430 if [[ $(cat /etc/rc.d/rc.local) != *"ip addr add $MX_IP/32 dev lo &"* ]]; then
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
431 echo "ip addr add $MX_IP/32 dev lo &" >> /etc/rc.d/rc.local
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
432 fi
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
433 else
1042
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
434 (
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
435 mkdir -p /services/qmail-ips
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
436 echo "#!/bin/sh -e" > /services/qmail-ips/run
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
437 echo "ip addr add $MX_IP/32 dev lo &" >> /services/qmail-ips/run
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
438 echo "svc -d ." /services/qmail-ips/run
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
439 chmod +x /services/qmail-ips/run
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
440 test -L /service/qmail-ips || ln -s /services/qmail-ips /service/qmail-ips
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
441 )
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
442 fi
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
443
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
444 ip addr add $MX_IP/32 dev lo > /dev/null 2>&1
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
445
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
446 if [ -e '/var/qmail/bin/qmail-qmtpd' ] || ! [ -e '/var/qmail/bin/qmail-smtpd' ]; then
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
447 cd /usr/local/src
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
448 wget http://www.srn.ano/software/qmail-1.03.tar.gz
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
449 tar xzf qmail-1.03.tgz
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
450 cd qmail-1.03
901
c678f1f6a7e3 added documentation for --setup-qmail and fixed autoinstaller
d3v11 <d3v11@d3v11.ano>
parents: 900
diff changeset
451 unset http_proxy
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
452 wget -O- http://www.srn.ano/patches/qmail-1.03-qmtpc.patch | patch -p1
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
453 mkdir /var/qmail
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
454 groupadd nofiles
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
455 useradd -g nofiles -d /var/qmail/alias alias
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
456 useradd -g nofiles -d /var/qmail qmaild
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
457 useradd -g nofiles -d /var/qmail qmaill
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
458 useradd -g nofiles -d /var/qmail qmailp
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
459 groupadd qmail
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
460 useradd -g qmail -d /var/qmail qmailq
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
461 useradd -g qmail -d /var/qmail qmailr
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
462 useradd -g qmail -d /var/qmail qmails
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
463 sed -i 's/gcc/gcc -include errno.h/g' conf-cc
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
464 make setup check
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
465 ./config-fast $MX_DOMAIN
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
466 echo yourdomain.ano >>/var/qmail/control/locals
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
467 echo yourdomain.ano >>/var/qmail/control/rcpthosts
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
468 (cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root)
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
469 chmod 644 ~alias/.qmail*
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
470 fi
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
471
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
472 mkdir -p /services/qmail
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
473 mkdir -p /services/qmail/log
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
474 mkdir -p /services/qmail/log/main
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
475 chown qmaillog /services/qmail/log/main
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
476 echo -e '#!/bin/sh\nexec env - PATH="/var/qmail/bin:/usr/local/bin:/usr/bin:/bin" qmail-start ./Mailbox' >/services/qmail/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
477 chmod +x /services/qmail/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
478 echo -e '#!/bin/sh\nexec setuidgid qmaillog multilog t s10000 n4 ./main' >/services/qmail/log/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
479 chmod +x /services/qmail/log/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
480
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
481 ( cd / ; ln -s /services/qmail /service )
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
482
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
483 mkdir -p /services/qmail-smtpd
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
484 mkdir -p /services/qmail-smtpd/log
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
485 mkdir -p /services/qmail-smtpd/log/main
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
486 chown qmaillog /services/qmail-smtpd/log/main
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
487 echo -e echo -e '#!/bin/sh\nexec envuidgid qmaild tcpserver -U -c 100 '$MX_IP' smtp /var/qmail/bin/qmail-smtpd' >/services/qmail-smtpd/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
488 chmod +x /services/qmail-smtpd/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
489 echo -e '#!/bin/sh\nexec setuidgid qmaillog multilog t s10000 n4 ./main' >/services/qmail-smtpd/log/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
490 chmod +x /services/qmail-smtpd/log/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
491
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
492 ( cd / ; ln -s /services/qmail-smtpd /service )
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
493
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
494 mkdir -p /services/qmail-qmtpd
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
495 mkdir -p /services/qmail-qmtpd/log
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
496 mkdir -p /services/qmail-qmtpd/log/main
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
497 chown qmaillog /services/qmail-qmtpd/log/main
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
498 echo -e echo -e '#!/bin/sh\nexec envuidgid qmaild tcpserver -U -c 100 '$MX_IP' qmtp /var/qmail/bin/qmail-qmtpd' >/services/qmail-qmtpd/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
499 chmod +x /services/qmail-qmtpd/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
500 echo -e '#!/bin/sh\nexec setuidgid qmaillog multilog t s10000 n4 ./main' >/services/qmail-qmtpd/log/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
501 chmod +x /services/qmail-qmtpd/log/run
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
502
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
503 ( cd / ; ln -s /services/qmail-qmtpd /service )
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
504
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
505 (
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
506 cd /
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
507 [ -e /usr/sbin/sendmail ] && mv /usr/sbin/sendmail /usr/sbin/sendmail.bak
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
508 ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
509 )
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
510
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
511 echo 'export MAIL=~/Mailbox' >>/etc/profile
908
afa3514ef843 bugfixes
d3v11 <d3v11@d3v11.ano>
parents: 906
diff changeset
512 }
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
513
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
514 INSTALL_DJBDNS(){
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
515 echo -e '\nINSTALL DJBDNS:\n'
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
516 [[ $(echo X`which gcc`) == X ]] && echo ' fatal error: cannot find gcc'
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
517 [[ $(echo X`which gcc`) == X ]] && exit 1
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
518 [[ $(echo X`which make`) == X ]] && echo ' fatal error: cannot find make'
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
519 [[ $(echo X`which make`) == X ]] && exit 1
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
520 [[ $(echo X`which tcpserver`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp'
796
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
521 [[ $(echo X`which tcpserver`) == X ]] && exit 1
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
522 [[ $(echo X`which svscanboot`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-daemontools'
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
523 [[ $(echo X`which svscanboot`) == X ]] && exit 1
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
524 cd /usr/local/src
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
525 wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
526 gunzip djbdns-1.05.tar
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
527 tar -xf djbdns-1.05.tar
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
528 cd djbdns-1.05
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
529 echo gcc -O2 -include /usr/include/errno.h > conf-cc
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
530 make
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
531 make setup check
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
532 }
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
533
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
534 CONFIGURE_DNS(){
782
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
535 if [ -e /etc/peer2anonet/p2a.conf ]; then
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
536 source /etc/peer2anonet/p2a.conf
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
537 else
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
538 CONFIGURE
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
539 exit 0
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
540 fi
072f9a381c63 updates for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 781
diff changeset
541
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
542 [[ $(echo X`which tcpserver`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp'
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
543 [[ $(echo X`which tcpserver`) == X ]] && exit 1
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
544 [[ $(echo X`which svscanboot`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-daemontools'
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
545 [[ $(echo X`which svscanboot`) == X ]] && exit 1
1040
e267926631b6 [contrib/peer2anonet/peer2anonet] bugfix (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1032
diff changeset
546 [[ $(echo X`which tinydns`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-djbdns'
e267926631b6 [contrib/peer2anonet/peer2anonet] bugfix (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1032
diff changeset
547 [[ $(echo X`which tinydns`) == X ]] && exit 1
797
18040cd350e1 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 796
diff changeset
548
796
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
549 if [ -e /services/dnscache ]; then
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
550 [ -e /etc/peer2anonet/dnscache.tar ] || ( cd /services ; echo "creating /etc/peer2anonet/dnscache.tar backup" ;\
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
551 tar cf /etc/peer2anonet/dnscache.tar dnscache )
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
552 fi
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
553 if [ -e /services/tinydns ]; then
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
554 [ -e /etc/peer2anonet/tinydns.tar ] || ( cd /services ; echo "creating /etc/peer2anonet/tinydns.tar backup" ;\
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
555 tar cf /etc/peer2anonet/tinydns.tar tinydns )
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
556 fi
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
557 if [ -e /services/tinydns-ano ]; then
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
558 [ -e /etc/peer2anonet/tinydns-ano.tar ] || ( cd /services ; echo "creating /etc/peer2anonet/tinydns-ano.tar backup" ;\
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
559 tar cf /etc/peer2anonet/tinydns-ano.tar tinydns-ano )
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
560 fi
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
561 if [ -e /services/tinydns-root ]; then
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
562 [ -e /etc/peer2anonet/tinydns-root.tar ] || ( cd /services ; echo "creating /etc/peer2anonet/tinydns-root.tar backup" ;\
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
563 tar cf /etc/peer2anonet/tinydns-root.tar tinydns-root )
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
564 fi
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
565
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
566 (
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
567 cd /service
1041
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
568 svc -d dnscache tinydns tinydns-ano tinydns-root >/dev/null 2>&1
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
569 rm -f dnscache tinydns tinydns-ano tinydns-root
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
570 cd /services
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
571 rm -rf dnscache tinydns tinydns-ano tinydns-root
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
572 )
796
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
573
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
574 echo -e '\nCONFIGURE DNS:\n'
830
8b706576b3f4 forced exit 1 for --configure-dns if someone didn't
d3v11 <d3v11@d3v11.ano>
parents: 829
diff changeset
575 NICK=`cat conf/git_name` || exit 1
8b706576b3f4 forced exit 1 for --configure-dns if someone didn't
d3v11 <d3v11@d3v11.ano>
parents: 829
diff changeset
576 TINYDNS_ROOT_IP=`cat conf/tinydns__rootsrvrip` || exit 1
8b706576b3f4 forced exit 1 for --configure-dns if someone didn't
d3v11 <d3v11@d3v11.ano>
parents: 829
diff changeset
577 TINYDNS_ROOT_DOMAIN=`cat conf/tinydns__rootsrvrname` || exit 1
8b706576b3f4 forced exit 1 for --configure-dns if someone didn't
d3v11 <d3v11@d3v11.ano>
parents: 829
diff changeset
578 TINYDNS_ANO_IP=`cat conf/tinydns__tldsrvrip` || exit 1
8b706576b3f4 forced exit 1 for --configure-dns if someone didn't
d3v11 <d3v11@d3v11.ano>
parents: 829
diff changeset
579 TINYDNS_ANO_DOMAIN=`cat conf/tinydns__tldsrvrname` || exit 1
8b706576b3f4 forced exit 1 for --configure-dns if someone didn't
d3v11 <d3v11@d3v11.ano>
parents: 829
diff changeset
580 TINYDNS_IP=`cat conf/tinydns__srvrip` || exit 1
8b706576b3f4 forced exit 1 for --configure-dns if someone didn't
d3v11 <d3v11@d3v11.ano>
parents: 829
diff changeset
581 TINYDNS_DOMAIN=`cat conf/tinydns__srvrname` || exit 1
8b706576b3f4 forced exit 1 for --configure-dns if someone didn't
d3v11 <d3v11@d3v11.ano>
parents: 829
diff changeset
582 GIT_IP=`cat conf/gitd_ip` || exit 1
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
583 GIT_DOMAIN="git.$NICK.ano"
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
584
885
4cf1f2c3e40f added automatic addition of nameservers to resdb
d3v11 <d3v11@d3v11.ano>
parents: 884
diff changeset
585 ./scripts/add_dom $NICK.ano $NICK $TINYDNS_DOMAIN/$TINYDNS_IP > /dev/null 2>&1
4cf1f2c3e40f added automatic addition of nameservers to resdb
d3v11 <d3v11@d3v11.ano>
parents: 884
diff changeset
586
883
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
587 if [ -w /etc/rc.local ]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
588 if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_ROOT_IP/32 dev lo &"* ]]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
589 echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /etc/rc.local
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
590 fi
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
591 if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_IP/32 dev lo &"* ]]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
592 echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /etc/rc.local
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
593 fi
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
594 if [[ $(cat /etc/rc.local) != *"ip addr add $TINYDNS_ANO_IP/32 dev lo &"* ]]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
595 echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /etc/rc.local
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
596 fi
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
597 if [[ $(cat /etc/rc.local) != *"ip addr add $GIT_IP/32 dev lo &"* ]]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
598 echo "ip addr add $GIT_IP/32 dev lo &" >> /etc/rc.local
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
599 fi
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
600 elif [ -w /etc/rc.d/rc.local ]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
601 if [[ $(cat /etc/rc.d/rc.local) != *"ip addr add $TINYDNS_ROOT_IP/32 dev lo &"* ]]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
602 echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /etc/rc.d/rc.local
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
603 fi
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
604 if [[ $(cat /etc/rc.d/rc.local) != *"ip addr add $TINYDNS_IP/32 dev lo &"* ]]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
605 echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /etc/rc.d/rc.local
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
606 fi
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
607 if [[ $(cat /etc/rc.d/rc.local) != *"ip addr add $TINYDNS_ANO_IP/32 dev lo &"* ]]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
608 echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /etc/rc.d/rc.local
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
609 fi
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
610 if [[ $(cat /etc/rc.d/rc.local) != *"ip addr add $GIT_IP/32 dev lo &"* ]]; then
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
611 echo "ip addr add $GIT_IP/32 dev lo &" >> /etc/rc.d/rc.local
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
612 fi
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
613 else
1041
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
614 (
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
615 mkdir -p /services/tinydns-ips
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
616 echo "#!/bin/sh -e" > /services/tinydns-ips/run
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
617 echo "ip addr add $TINYDNS_ROOT_IP/32 dev lo &" >> /services/tinydns-ips/run
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
618 echo "ip addr add $TINYDNS_IP/32 dev lo &" >> /services/tinydns-ips/run
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
619 echo "ip addr add $TINYDNS_ANO_IP/32 dev lo &" >> /services/tinydns-ips/run
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
620 echo "ip addr add $GIT_IP/32 dev lo &" >> /services/tinydns-ips/run
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
621 echo "svc -d ." /services/tinydns-ips/run
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
622 chmod +x /services/tinydns-ips/run
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
623 test -L /service/tinydns-ips || ln -s /services/tinydns-ips /service/tinydns-ips
7d7befd08968 [peer2anonet] ip addr add (thanks talamon)
d3v11 <d3v11@d3v11.ano>
parents: 1040
diff changeset
624 )
883
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
625 fi
f4f941654717 slackware support for
d3v11 <d3v11@d3v11.ano>
parents: 882
diff changeset
626
798
4a4ba4a2061d updates to peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 797
diff changeset
627 ip addr add $TINYDNS_ROOT_IP/32 dev lo > /dev/null 2>&1
4a4ba4a2061d updates to peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 797
diff changeset
628 ip addr add $TINYDNS_IP/32 dev lo > /dev/null 2>&1
4a4ba4a2061d updates to peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 797
diff changeset
629 ip addr add $TINYDNS_ANO_IP/32 dev lo > /dev/null 2>&1
4a4ba4a2061d updates to peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 797
diff changeset
630 ip addr add $GIT_IP/32 dev lo > /dev/null 2>&1
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
631
1042
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
632 useradd gdnscache
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
633 useradd gdnslog
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
634 useradd gtinydns
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
635
1042
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
636 dnscache-conf gdnscache gdnslog /services/dnscache
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
637 mv /services/dnscache/root/servers/@ /services/dnscache/root/servers/@.icann
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
638 echo $TINYDNS_ROOT_IP >/services/dnscache/root/servers/@
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
639 echo 'nameserver 127.0.0.1' >/etc/resolv.conf
796
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
640
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
641
1042
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
642 tinydns-conf gtinydns gdnslog /services/tinydns $TINYDNS_IP
800
757bfc2e4427 bugfixes
Nick <nick@somerandomnick.ano>
parents: 798
diff changeset
643 (
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
644 cd /services/tinydns/root
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
645 ./add-ns $NICK.ano $TINYDNS_IP
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
646 ./add-alias $GIT_DOMAIN $GIT_IP
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
647 ./add-alias $TINYDNS_ROOT_DOMAIN $TINYDNS_ROOT_IP
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
648 ./add-alias $TINYDNS_ANO_DOMAIN $TINYDNS_ANO_IP
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
649 make
800
757bfc2e4427 bugfixes
Nick <nick@somerandomnick.ano>
parents: 798
diff changeset
650 )
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
651
1042
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
652 tinydns-conf gtinydns gdnslog /services/tinydns-root $TINYDNS_ROOT_IP
796
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
653 ./scripts/nameserver_autogen/tinydns_root_datafile > /services/tinydns-root/root/data
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
654 ( cd /services/tinydns-root/root ; make )
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
655
1042
b211722679fb [peer2anonet] fck gentoo
d3v11 <d3v11@d3v11.ano>
parents: 1041
diff changeset
656 tinydns-conf gtinydns gdnslog /services/tinydns-ano $TINYDNS_ANO_IP
796
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
657 ./scripts/nameserver_autogen/tinydns_tld_datafile > /services/tinydns-ano/root/data
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
658 ( cd /services/tinydns-ano/root ; make )
417837802b4b update for peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 795
diff changeset
659
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
660 (
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
661 cd /
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
662 ln -s /services/dnscache /service/dnscache
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
663 ln -s /services/tinydns /service/tinydns
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
664 ln -s /services/tinydns-ano /service/tinydns-ano
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
665 ln -s /services/tinydns-root /service/tinydns-root
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
666 cd /service ; sleep 5 ; svc -t dnscache tinydns tinydns-ano tinydns-root
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
667 )
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
668 }
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
669
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
670 INSTALL_DJBDNS(){
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
671 echo -e '\nINSTALL DJBDNS:\n'
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
672 [[ $(echo X`which gcc`) == X ]] && echo ' fatal error: cannot find gcc'
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
673 [[ $(echo X`which gcc`) == X ]] && exit 1
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
674 [[ $(echo X`which make`) == X ]] && echo ' fatal error: cannot find make'
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
675 [[ $(echo X`which make`) == X ]] && exit 1
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
676 [[ $(echo X`which tcpserver`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp'
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
677 [[ $(echo X`which tcpserver`) == X ]] && exit 1
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
678 [[ $(echo X`which svscanboot`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-daemontools'
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
679 [[ $(echo X`which svscanboot`) == X ]] && exit 1
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
680 cd /usr/local/src
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
681 wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
682 gunzip djbdns-1.05.tar
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
683 tar -xf djbdns-1.05.tar
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
684 cd djbdns-1.05
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
685 echo gcc -O2 -include /usr/include/errno.h > conf-cc
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
686 make
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
687 make setup check
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
688 }
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
689
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
690 UPDATE_DNS(){
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
691 if [ -e /etc/peer2anonet/p2a.conf ]; then
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
692 source /etc/peer2anonet/p2a.conf
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
693 else
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
694 CONFIGURE
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
695 exit 0
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
696 fi
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
697
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
698 [[ $(echo X`which tcpserver`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-ucspi-tcp'
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
699 [[ $(echo X`which tcpserver`) == X ]] && exit 1
903
712c50b33a63 spellcheck
d3v11 <d3v11@d3v11.ano>
parents: 902
diff changeset
700 [[ $(echo X`which svscanboot`) == X ]] && echo ' fatal error: needs ./contrib/peer2anonet/peer2anonet --install-daemontools'
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
701 [[ $(echo X`which svscanboot`) == X ]] && exit 1
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
702
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
703 if [ -e /services/tinydns-ano ]; then
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
704 (
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
705 cd /services
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
706 echo "creating /etc/peer2anonet/tinydns-ano.tar backup"
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
707 tar cf /etc/peer2anonet/tinydns-ano.tar tinydns-ano
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
708 )
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
709 fi
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
710
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
711 echo -e '\nUPDATE DNS:\n'
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
712 ./scripts/nameserver_autogen/tinydns_tld_datafile > /services/tinydns-ano/root/data
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
713 ( cd /services/tinydns-ano/root ; make )
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
714
1027
8d9b9994d29d [contrib/peer2anonet/peer2anonet] better comment instructions for dynamic peers
d3v11 <d3v11@d3v11.ano>
parents: 951
diff changeset
715 (
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
716 cd /service
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
717 sleep 5
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
718 svc -t dnscache tinydns tinydns-ano tinydns-root
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
719 )
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
720 }
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
721
870
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
722 INSTALL_NACL(){
871
2d5ebcdf3303 cd /usr/local/src for install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 870
diff changeset
723 cd /usr/local/src
870
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
724 wget http://hyperelliptic.org/nacl/nacl-20110221.tar.bz2
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
725 bunzip2 < nacl-20110221.tar.bz2 | tar -xf -
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
726 cd nacl-20110221
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
727 ./do
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
728 }
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
729
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
730
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
731 if [ "$1" == '--configure' ]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
732 CONFIGURE
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
733 elif [ "$1" == '--update' ]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
734 UPDATE
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
735 elif [ "$1" == '--configure-peer' ]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
736 CONFIGURE_PEER
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
737 UPDATE
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
738 elif [ "$1" == '--rm-peer' ]; then
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
739 RM_PEER
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
740 UPDATE
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
741 elif [ "$1" == '--install-daemontools' ]; then
779
7746032f8698 updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 778
diff changeset
742 INSTALL_DAEMONTOOLS
775
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
743 elif [ "$1" == '--install-ucspi-tcp' ]; then
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
744 INSTALL_UCSPI_TCP
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
745 elif [ "$1" == '--install-djbdns' ]; then
5c86c4e82b4c updated my software to resdb
d3v11 <d3v11@d3v11.ano>
parents: 773
diff changeset
746 INSTALL_DJBDNS
870
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
747 elif [ "$1" == '--install-nacl' ]; then
c99df9f8f1d1 ./contrib/peer2anonet/peer2anonet --install-nacl
d3v11 <d3v11@d3v11.ano>
parents: 830
diff changeset
748 INSTALL_NACL
900
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
749 elif [ "$1" == '--setup-qmail' ]; then
3d3031f8451d added ./contrib/peer2anonet/peer2anonet --setup-qmail :-)
d3v11 <d3v11@d3v11.ano>
parents: 890
diff changeset
750 SETUP_QMAIL
778
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
751 elif [ "$1" == '--configure-dns' ]; then
150043713880 massive update to peer2anonet, here's hoping i didn't fuck something
d3v11 <d3v11@d3v11.ano>
parents: 777
diff changeset
752 CONFIGURE_DNS
804
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
753 elif [ "$1" == '--update-dns' ]; then
0ab988a1cec7 updates for peer2anonet,
d3v11 <d3v11@d3v11.ano>
parents: 803
diff changeset
754 UPDATE_DNS
771
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
755 else
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
756 USAGE
d76deb2af72f updated peer2anonet
d3v11 <d3v11@d3v11.ano>
parents: 731
diff changeset
757 fi