forked from iwbinb/bee-swarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_en.sh
73 lines (65 loc) · 1.82 KB
/
install_en.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
homedir=$HOME
echo 'Installing packages'
sudo apt-get update
sudo apt -y install curl
sudo apt -y install wget
sudo apt -y install tmux
sudo apt -y install jq
echo 'Installing Swarm Bee'
curl -s https://raw.githubusercontent.com/ethersphere/bee/master/install.sh | TAG=v0.5.0 bash
echo 'Installing Bee Clef'
wget https://github.com/ethersphere/bee-clef/releases/download/v0.4.7/bee-clef_0.4.7_amd64.deb
sudo dpkg -i bee-clef_0.4.7_amd64.deb
echo 'Making config'
echo "api-addr: :1633
bootnode:
- /dnsaddr/bootnode.ethswarm.org
clef-signer-enable: false
clef-signer-endpoint: ""
config: /root/.bee.yaml
cors-allowed-origins: []
data-dir: /root/.bee
db-capacity: "5000000"
debug-api-addr: :1635
debug-api-enable: true
gateway-mode: false
global-pinning-enable: false
help: false
nat-addr: ""
network-id: "1"
p2p-addr: :1634
p2p-quic-enable: false
p2p-ws-enable: false
password: ""
password-file: ""
payment-early: "1000000000000"
payment-threshold: "10000000000000"
payment-tolerance: "50000000000000"
resolver-options: []
standalone: false
swap-enable: true
swap-endpoint: https://goerli.prylabs.net
swap-factory-address: ""
swap-initial-deposit: "100000000000000000"
tracing-enable: false
tracing-endpoint: 127.0.0.1:6831
tracing-service-name: bee
verbosity: info
welcome-message: ""
" >> bee-config.yaml
echo 'Installing a script for cashing checks'
wget https://github.com/grodstrike/bee-swarm/raw/main/cashout.sh $homedir/cashout.sh
chmod 777 cashout.sh
#write out current crontab
crontab -l > mycron
#echo new cron into cron file
sudo echo "0 */6 * * * /bin/bash $homedir/cashout.sh cashout-all >> $homedir/cash.log 2>&1 " >> mycron
#install new cron file
crontab mycron
rm mycron
sudo systemctl restart cron
echo 'Starting a node'
tmux new -d -s bee
tmux send-keys -t bee.0 "sudo bee start --config bee-config.yaml" ENTER
tmux a -t bee