introduce DietPi compatibility Succedsful tests on Odoroid HC1 and rPi running DietPidev
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 58 KiB |
@ -1,219 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
# Background: |
|||
# https://medium.com/@lopp/how-to-run-bitcoin-as-a-tor-hidden-service-on-ubuntu-cff52d543756 |
|||
# https://bitcoin.stackexchange.com/questions/70069/how-can-i-setup-bitcoin-to-be-anonymous-with-tor |
|||
# https://github.com/lightningnetwork/lnd/blob/master/docs/configuring_tor.md |
|||
|
|||
# load network |
|||
network=`cat .network` |
|||
chain="$(${network}-cli getblockchaininfo | jq -r '.chain')" |
|||
|
|||
# location of TOR config |
|||
torrc="/etc/tor/torrc" |
|||
|
|||
# check if TOR was already installed and is funtional |
|||
clear |
|||
echo "" |
|||
echo "*** Check if TOR service is functional ***" |
|||
torRunning=$(curl --connect-timeout 10 --socks5-hostname 127.0.0.1:9050 https://check.torproject.org | grep "Congratulations. This browser is configured to use Tor." -c) |
|||
if [ ${torRunning} -gt 0 ]; then |
|||
clear |
|||
echo "You are all good - TOR is already running." |
|||
echo "" |
|||
exit 0 |
|||
else |
|||
echo "TOR not running ... proceed with switching to TOR." |
|||
echo "" |
|||
fi |
|||
|
|||
# ask user if to proceed |
|||
dialog --title " WARNING " --yesno "At the moment you just can switch TOR on - YOU CANNOT SWITCH BACK. Do you want to proceed?" 8 57 |
|||
response=$? |
|||
case $response in |
|||
1) exit 1; |
|||
esac |
|||
|
|||
echo "*** Adding Tor Sources to sources.list ***" |
|||
echo "deb http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list |
|||
echo "deb-src http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list |
|||
echo "OK" |
|||
echo "" |
|||
|
|||
echo "*** Installing dirmngr ***" |
|||
sudo apt install dirmngr |
|||
echo "" |
|||
|
|||
## lopp: gpg --keyserver keys.gnupg.net --recv 886DDD89 |
|||
echo "*** Fetching GPG key ***" |
|||
gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 |
|||
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - |
|||
echo "" |
|||
|
|||
echo "*** Updating System ***" |
|||
sudo apt-get update |
|||
echo "" |
|||
|
|||
echo "*** Install Tor ***" |
|||
sudo apt install tor tor-arm -y |
|||
|
|||
echo "" |
|||
echo "*** Tor Config ***" |
|||
sudo rm -r -f /mnt/hdd/tor 2>/dev/null |
|||
sudo mkdir /mnt/hdd/tor |
|||
sudo mkdir /mnt/hdd/tor/sys |
|||
sudo mkdir /mnt/hdd/tor/web80 |
|||
sudo mkdir /mnt/hdd/tor/lnd9735 |
|||
sudo mkdir /mnt/hdd/tor/lndrpc9735 |
|||
sudo chmod -R 700 /mnt/hdd/tor |
|||
sudo chown -R bitcoin:bitcoin /mnt/hdd/tor |
|||
cat > ./torrc <<EOF |
|||
### See 'man tor', or https://www.torproject.org/docs/tor-manual.html |
|||
|
|||
DataDirectory /mnt/hdd/tor/sys |
|||
PidFile /mnt/hdd/tor/sys/tor.pid |
|||
|
|||
SafeLogging 0 |
|||
Log notice stdout |
|||
Log notice file /mnt/hdd/tor/notice.log |
|||
Log info file /mnt/hdd/tor/info.log |
|||
|
|||
RunAsDaemon 1 |
|||
User bitcoin |
|||
PortForwarding 1 |
|||
ControlPort 9051 |
|||
SocksPort 9050 |
|||
|
|||
CookieAuthFile /mnt/hdd/tor/sys/control_auth_cookie |
|||
CookieAuthentication 1 |
|||
CookieAuthFileGroupReadable 1 |
|||
|
|||
# Hidden Service v2 for WEB ADMIN INTERFACE |
|||
HiddenServiceDir /mnt/hdd/tor/web80/ |
|||
HiddenServicePort 80 127.0.0.1:80 |
|||
|
|||
# Hidden Service v2 for LND RPC |
|||
HiddenServiceDir /mnt/hdd/tor/lndrpc10009/ |
|||
HiddenServicePort 80 127.0.0.1:10009 |
|||
|
|||
# Hidden Service v3 for LND incomming connections (just in case) |
|||
# https://trac.torproject.org/projects/tor/wiki/doc/NextGenOnions#Howtosetupyourownprop224service |
|||
HiddenServiceDir /mnt/hdd/tor/lnd9735 |
|||
HiddenServiceVersion 3 |
|||
HiddenServicePort 9735 127.0.0.1:9735 |
|||
|
|||
# NOTE: bitcoind get tor service automatically - see /mnt/hdd/bitcoin for onion key |
|||
EOF |
|||
sudo rm $torrc |
|||
sudo mv ./torrc $torrc |
|||
sudo chmod 644 $torrc |
|||
sudo chown -R bitcoin:bitcoin /var/run/tor/ |
|||
echo "" |
|||
|
|||
# NYX - Tor monitor tool |
|||
# https://nyx.torproject.org/#home |
|||
echo "*** Installing NYX - TOR monitoring Tool ***" |
|||
nyxInstalled=$(sudo pip list 2>/dev/null | grep 'nyx' -c) |
|||
if [ ${nyxInstalled} -eq 0 ]; then |
|||
sudo pip install nyx |
|||
else |
|||
echo "NYX already installed" |
|||
fi |
|||
echo "" |
|||
|
|||
echo "*** Activating TOR system service ***" |
|||
echo "ReadWriteDirectories=-/mnt/hdd/tor" | sudo tee -a /lib/systemd/system/tor@default.service |
|||
sudo systemctl daemon-reload |
|||
sudo systemctl restart tor@default |
|||
echo "" |
|||
|
|||
echo "*** Waiting for TOR to boostrap ***" |
|||
torIsBootstrapped=0 |
|||
while [ ${torIsBootstrapped} -eq 0 ] |
|||
do |
|||
echo "--- Checking 1 ---" |
|||
date +%s |
|||
sudo cat /mnt/hdd/tor/notice.log 2>/dev/null | grep "Bootstrapped" | tail -n 10 |
|||
torIsBootstrapped=$(sudo cat /mnt/hdd/tor/notice.log 2>/dev/null | grep "Bootstrapped 100" -c) |
|||
echo "torIsBootstrapped(${torIsBootstrapped})" |
|||
echo "If this takes too long --> CTRL+c, reboot and check manually" |
|||
sleep 5 |
|||
done |
|||
echo "OK - Tor Bootstrap is ready" |
|||
echo "" |
|||
|
|||
echo "*** Changing ${network} Config ***" |
|||
networkIsTor=$(sudo cat /home/bitcoin/.${network}/${network}.conf | grep 'onlynet=onion' -c) |
|||
if [ ${networkIsTor} -eq 0 ]; then |
|||
|
|||
echo "Only Connect thru TOR" |
|||
echo "onlynet=onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
|
|||
if [ "${network}" = "bitcoin" ]; then |
|||
echo "Adding some bitcoin onion nodes to connect to" |
|||
echo "addnode=fno4aakpl6sg6y47.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
echo "addnode=toguvy5upyuctudx.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
echo "addnode=ndndword5lpb7eex.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
echo "addnode=6m2iqgnqjxh7ulyk.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
echo "addnode=5tuxetn7tar3q5kp.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
fi |
|||
|
|||
sudo cp /home/bitcoin/.${network}/${network}.conf /home/admin/.${network}/${network}.conf |
|||
sudo chown admin:admin /home/admin/.${network}/${network}.conf |
|||
|
|||
else |
|||
echo "Chain network already configured for TOR" |
|||
fi |
|||
|
|||
echo "*** ${network} re-init - Waiting for Onion Address ***" |
|||
# restarting bitcoind to start with tor and generare onion.address |
|||
echo "restarting ${network}d ..." |
|||
sudo systemctl restart ${network}d |
|||
sleep 8 |
|||
onionAddress="" |
|||
while [ ${#onionAddress} -eq 0 ] |
|||
do |
|||
echo "--- Checking 2 ---" |
|||
date +%s |
|||
testNetAdd="" |
|||
if [ "${chain}" = "test" ];then |
|||
testNetAdd="/testnet3" |
|||
fi |
|||
sudo cat /mnt/hdd/${network}${testNetAdd}/debug.log 2>/dev/null | grep "tor" | tail -n 10 |
|||
onionAddress=$(sudo -u bitcoin ${network}-cli getnetworkinfo | grep '"address"' | cut -d '"' -f4) |
|||
echo "Can take up to 20min - if this takes longer --> CTRL+c, reboot and check manually" |
|||
sleep 5 |
|||
done |
|||
onionPort=$(sudo -u bitcoin ${network}-cli getnetworkinfo | grep '"port"' | tr -dc '0-9') |
|||
echo "Your Chain Network Onion Address is: ${onionAddress}:${onionPort}" |
|||
echo "" |
|||
|
|||
echo "*** Setting your Onion Address ***" |
|||
onionLND=$(sudo cat /mnt/hdd/tor/lnd9735/hostname) |
|||
echo "Your Lightning Tor Onion Address is: ${onionLND}:9735" |
|||
echo "" |
|||
|
|||
# ACTIVATE LND OVER TOR |
|||
echo "*** Putting LND behind TOR ***" |
|||
echo "Disable LND again" |
|||
sudo systemctl disable lnd |
|||
echo "Writing Public Onion Address to /run/publicip (just in case for TotHiddenServiceV3)" |
|||
echo "PUBLICIP=${onionLND}" | sudo tee /run/publicip |
|||
echo "Configure and Changing to lnd.tor.service" |
|||
sed -i "5s/.*/Wants=${network}d.service/" ./assets/lnd.tor.service |
|||
sed -i "6s/.*/After=${network}d.service/" ./assets/lnd.tor.service |
|||
sudo cp /home/admin/assets/lnd.tor.service /etc/systemd/system/lnd.service |
|||
sudo chmod +x /etc/systemd/system/lnd.service |
|||
echo "Enable LND again" |
|||
sudo systemctl enable lnd |
|||
echo "OK" |
|||
echo "" |
|||
|
|||
echo "*** Finshing Setup / REBOOT ***" |
|||
echo "OK - all should be set" |
|||
echo "" |
|||
echo "PRESS ENTER ... to REBOOT" |
|||
read key |
|||
|
|||
sudo shutdown -r now |
|||
exit 0 |
@ -1,412 +0,0 @@ |
|||
admin@DietPi:~$ sudo nano 96addTorService.sh |
|||
admin@DietPi:~$ ./96addTorService.sh |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
*** Check if TOR service is functional *** |
|||
./96addTorService.sh: line 20: [: -gt: unary operator expected |
|||
TOR not running ... proceed with switching to TOR. |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
┌────────────────────── WARNING ────────────────────────┐ |
|||
│ At the moment you just can switch TOR on - YOU CANNOT │ |
|||
│ SWITCH BACK. Do you want to proceed? │ |
|||
│ │ |
|||
│ │ |
|||
├───────────────────────────────────────────────────────┤ |
|||
│ < Yes > < No > │ |
|||
└───────────────────────────────────────────────────────┘ |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
*** Adding Tor Sources to sources.list *** |
|||
deb http://deb.torproject.org/torproject.org stretch main |
|||
deb-src http://deb.torproject.org/torproject.org stretch main |
|||
OK |
|||
|
|||
*** Installing dirmngr *** |
|||
Reading package lists... Done |
|||
Building dependency tree |
|||
Reading state information... Done |
|||
dirmngr is already the newest version (2.1.18-8~deb9u3). |
|||
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
|||
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:8 |
|||
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:10 |
|||
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
|
|||
*** Fetching GPG key *** |
|||
uid deb.torproject.org archive signing key |
|||
sig!3 EE8CBC9E886DDD89 2009-09-04 [self-signature] |
|||
sig!3 EE8CBC9E886DDD89 2012-08-29 [self-signature] |
|||
sig!3 EE8CBC9E886DDD89 2014-08-31 [self-signature] |
|||
sig!3 EE8CBC9E886DDD89 2018-08-06 [self-signature] |
|||
sub 74A941BA219EC810 |
|||
sig! EE8CBC9E886DDD89 2009-09-04 [self-signature] |
|||
sig! EE8CBC9E886DDD89 2012-08-29 [self-signature] |
|||
sig! EE8CBC9E886DDD89 2014-08-31 [self-signature] |
|||
sig! EE8CBC9E886DDD89 2018-08-06 [self-signature] |
|||
key EE8CBC9E886DDD89: |
|||
2 duplicate signatures removed |
|||
82 signatures not checked due to missing keys |
|||
gpg: key EE8CBC9E886DDD89: "deb.torproject.org archive signing key" not changed |
|||
gpg: Total number processed: 1 |
|||
gpg: unchanged: 1 |
|||
key EE8CBC9E886DDD89: |
|||
82 signatures not checked due to missing keys |
|||
OK |
|||
|
|||
*** Updating System *** |
|||
Hit:1 http://fuzon.co.uk/meveric all InRelease |
|||
Hit:2 http://deb.torproject.org/torproject.org stretch InRelease |
|||
Hit:3 http://fuzon.co.uk/meveric stretch InRelease |
|||
Ign:4 https://cdn-aws.deb.debian.org/debian stretch InRelease |
|||
Hit:5 https://cdn-aws.deb.debian.org/debian stretch-updates InRelease |
|||
Hit:6 https://cdn-aws.deb.debian.org/debian-security stretch/updates InRelease |
|||
Hit:7 https://cdn-aws.deb.debian.org/debian stretch-backports InRelease |
|||
Hit:8 https://cdn-aws.deb.debian.org/debian stretch Release |
|||
Hit:10 https://oph.mdrjr.net/meveric all InRelease |
|||
Reading package lists... Done |
|||
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:8 |
|||
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:10 |
|||
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:8 |
|||
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:10 |
|||
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7 |
|||
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:9 |
|||
|
|||
*** Install Tor *** |
|||
Reading package lists... Done |
|||
Building dependency tree |
|||
Reading state information... Done |
|||
tor-arm is already the newest version (1.4.5.0-1.1). |
|||
tor is already the newest version (0.3.5.7-1~d90.stretch+1). |
|||
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
|||
|
|||
*** Tor Config *** |
|||
|
|||
*** Installing NYX - TOR monitoring Tool *** |
|||
Collecting nyx |
|||
Using cached https://files.pythonhosted.org/packages/f4/da/68419425cb0f64f996e2150045c7043c2bb61f77b5928c2156c26a21db88/nyx-2.1.0.tar.gz |
|||
Complete output from command python setup.py egg_info: |
|||
Traceback (most recent call last): |
|||
File "<string>", line 1, in <module> |
|||
ImportError: No module named setuptools |
|||
|
|||
---------------------------------------- |
|||
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-MEJi99/nyx/ |
|||
|
|||
*** Activating TOR system service *** |
|||
ReadWriteDirectories=-/mnt/hdd/tor |
|||
|
|||
*** Waiting for TOR to boostrap *** |
|||
--- Checking 1 --- |
|||
1548772231 |
|||
Jan 29 14:30:31.000 [notice] Bootstrapped 0%: Starting |
|||
torIsBootstrapped(0) |
|||
If this takes too long --> CTRL+c, reboot and check manually |
|||
--- Checking 1 --- |
|||
1548772236 |
|||
Jan 29 14:30:31.000 [notice] Bootstrapped 0%: Starting |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 5%: Connecting to directory server |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 10%: Finishing handshake with directory server |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 15%: Establishing an encrypted directory connection |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 20%: Asking for networkstatus consensus |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 25%: Loading networkstatus consensus |
|||
Jan 29 14:30:35.000 [notice] Bootstrapped 40%: Loading authority key certs |
|||
torIsBootstrapped(0) |
|||
If this takes too long --> CTRL+c, reboot and check manually |
|||
--- Checking 1 --- |
|||
1548772241 |
|||
Jan 29 14:30:31.000 [notice] Bootstrapped 0%: Starting |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 5%: Connecting to directory server |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 10%: Finishing handshake with directory server |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 15%: Establishing an encrypted directory connection |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 20%: Asking for networkstatus consensus |
|||
Jan 29 14:30:32.000 [notice] Bootstrapped 25%: Loading networkstatus consensus |
|||
Jan 29 14:30:35.000 [notice] Bootstrapped 40%: Loading authority key certs |
|||
Jan 29 14:30:37.000 [notice] Bootstrapped 45%: Asking for relay descriptors for internal paths |
|||
Jan 29 14:30:37.000 [notice] Bootstrapped 50%: Loading relay descriptors for internal paths |
|||
torIsBootstrapped(0) |
|||
If this takes too long --> CTRL+c, reboot and check manually |
|||
--- Checking 1 --- |
|||
1548772246 |
|||
Jan 29 14:30:35.000 [notice] Bootstrapped 40%: Loading authority key certs |
|||
Jan 29 14:30:37.000 [notice] Bootstrapped 45%: Asking for relay descriptors for internal paths |
|||
Jan 29 14:30:37.000 [notice] Bootstrapped 50%: Loading relay descriptors for internal paths |
|||
Jan 29 14:30:42.000 [notice] Bootstrapped 57%: Loading relay descriptors |
|||
Jan 29 14:30:42.000 [notice] Bootstrapped 65%: Loading relay descriptors |
|||
Jan 29 14:30:42.000 [notice] Bootstrapped 72%: Loading relay descriptors |
|||
Jan 29 14:30:42.000 [notice] Bootstrapped 80%: Connecting to the Tor network |
|||
Jan 29 14:30:42.000 [notice] Bootstrapped 85%: Finishing handshake with first hop |
|||
Jan 29 14:30:43.000 [notice] Bootstrapped 90%: Establishing a Tor circuit |
|||
Jan 29 14:30:43.000 [notice] Bootstrapped 100%: Done |
|||
torIsBootstrapped(1) |
|||
If this takes too long --> CTRL+c, reboot and check manually |
|||
OK - Tor Bootstrap is ready |
|||
|
|||
*** Changing bitcoin Config *** |
|||
Only Connect thru TOR |
|||
onlynet=onion |
|||
Adding some bitcoin onion nodes to connect to |
|||
addnode=fno4aakpl6sg6y47.onion |
|||
addnode=toguvy5upyuctudx.onion |
|||
addnode=ndndword5lpb7eex.onion |
|||
addnode=6m2iqgnqjxh7ulyk.onion |
|||
addnode=5tuxetn7tar3q5kp.onion |
|||
*** bitcoin re-init - Waiting for Onion Address *** |
|||
restarting bitcoind ... |
|||
--- Checking 2 --- |
|||
1548772262 |
|||
2019-01-29T13:57:22Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements |
|||
2019-01-29T13:58:22Z torcontrol thread start |
|||
2019-01-29T14:30:51Z tor: Thread interrupt |
|||
2019-01-29T14:30:51Z torcontrol thread exit |
|||
2019-01-29T14:30:54Z Assuming ancestors of block 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 have valid signatures. |
|||
2019-01-29T14:30:54Z Default data directory /home/bitcoin/.bitcoin |
|||
2019-01-29T14:30:54Z Using data directory /mnt/hdd/bitcoin |
|||
2019-01-29T14:30:54Z Using at most 40 automatic connections (1024 file descriptors available) |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements |
|||
error code: -28 |
|||
error message: |
|||
Loading block index... |
|||
Can take up to 20min - if this takes longer --> CTRL+c, reboot and check manually |
|||
--- Checking 2 --- |
|||
1548772267 |
|||
2019-01-29T13:57:22Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements |
|||
2019-01-29T13:58:22Z torcontrol thread start |
|||
2019-01-29T14:30:51Z tor: Thread interrupt |
|||
2019-01-29T14:30:51Z torcontrol thread exit |
|||
2019-01-29T14:30:54Z Assuming ancestors of block 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 have valid signatures. |
|||
2019-01-29T14:30:54Z Default data directory /home/bitcoin/.bitcoin |
|||
2019-01-29T14:30:54Z Using data directory /mnt/hdd/bitcoin |
|||
2019-01-29T14:30:54Z Using at most 40 automatic connections (1024 file descriptors available) |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements |
|||
error code: -28 |
|||
error message: |
|||
Loading block index... |
|||
Can take up to 20min - if this takes longer --> CTRL+c, reboot and check manually |
|||
--- Checking 2 --- |
|||
1548772272 |
|||
2019-01-29T13:57:22Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements |
|||
2019-01-29T13:58:22Z torcontrol thread start |
|||
2019-01-29T14:30:51Z tor: Thread interrupt |
|||
2019-01-29T14:30:51Z torcontrol thread exit |
|||
2019-01-29T14:30:54Z Assuming ancestors of block 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 have valid signatures. |
|||
2019-01-29T14:30:54Z Default data directory /home/bitcoin/.bitcoin |
|||
2019-01-29T14:30:54Z Using data directory /mnt/hdd/bitcoin |
|||
2019-01-29T14:30:54Z Using at most 40 automatic connections (1024 file descriptors available) |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements |
|||
error code: -28 |
|||
error message: |
|||
Rewinding blocks... |
|||
Can take up to 20min - if this takes longer --> CTRL+c, reboot and check manually |
|||
--- Checking 2 --- |
|||
1548772277 |
|||
2019-01-29T13:57:22Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements |
|||
2019-01-29T13:58:22Z torcontrol thread start |
|||
2019-01-29T14:30:51Z tor: Thread interrupt |
|||
2019-01-29T14:30:51Z torcontrol thread exit |
|||
2019-01-29T14:30:54Z Assuming ancestors of block 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 have valid signatures. |
|||
2019-01-29T14:30:54Z Default data directory /home/bitcoin/.bitcoin |
|||
2019-01-29T14:30:54Z Using data directory /mnt/hdd/bitcoin |
|||
2019-01-29T14:30:54Z Using at most 40 automatic connections (1024 file descriptors available) |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements |
|||
error code: -28 |
|||
error message: |
|||
Verifying blocks... |
|||
Can take up to 20min - if this takes longer --> CTRL+c, reboot and check manually |
|||
--- Checking 2 --- |
|||
1548772282 |
|||
2019-01-29T14:30:51Z tor: Thread interrupt |
|||
2019-01-29T14:30:51Z torcontrol thread exit |
|||
2019-01-29T14:30:54Z Assuming ancestors of block 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 have valid signatures. |
|||
2019-01-29T14:30:54Z Default data directory /home/bitcoin/.bitcoin |
|||
2019-01-29T14:30:54Z Using data directory /mnt/hdd/bitcoin |
|||
2019-01-29T14:30:54Z Using at most 40 automatic connections (1024 file descriptors available) |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements |
|||
2019-01-29T14:30:54Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements |
|||
2019-01-29T14:31:20Z torcontrol thread start |
|||
2019-01-29T14:31:20Z tor: Got service ID kxs4wmwoesb3z4e4, advertising service kxs4wmwoesb3z4e4.onion:8333 |
|||
Can take up to 20min - if this takes longer --> CTRL+c, reboot and check manually |
|||
Your Chain Network Onion Address is: kxs4wmwoesb3z4e4.onion:8333 |
|||
|
|||
*** Setting your Onion Address *** |
|||
Your Lightning Tor Onion Address is: mtgob7h2hupq7fqzp3egnayz2xvbam5d24ibm35dmr2jnsxwx7jfqcid.onion:9735 |
|||
|
|||
*** Putting LND behind TOR *** |
|||
Disable LND again |
|||
Removed /etc/systemd/system/multi-user.target.wants/lnd.service. |
|||
Writing Public Onion Address to /run/publicip (just in case for TotHiddenServiceV3) |
|||
PUBLICIP=mtgob7h2hupq7fqzp3egnayz2xvbam5d24ibm35dmr2jnsxwx7jfqcid.onion |
|||
Configure and Changing to lnd.tor.service |
|||
sed: can't read ./assets/lnd.tor.service: No such file or directory |
|||
sed: can't read ./assets/lnd.tor.service: No such file or directory |
|||
cp: cannot stat '/home/admin/assets/lnd.tor.service': No such file or directory |
|||
Enable LND again |
|||
Created symlink /etc/systemd/system/multi-user.target.wants/lnd.service → /etc/systemd/system/lnd.service. |
|||
OK |
|||
|
|||
*** Finshing Setup / REBOOT *** |
|||
OK - all should be set |
|||
|
|||
PRESS ENTER ... to REBOOT |
|||
|
Before Width: | Height: | Size: 32 KiB |
@ -0,0 +1,158 @@ |
|||
# ⚡️ RaspiBlitz on DietPi ⚡️ |
|||
# A hardware agnostic platform |
|||
|
|||
|
|||
This guide was tested on: |
|||
|
|||
* Odroid HC1 |
|||
* Odroid HC2 (the same board except it accommodates a 3.5" 12V HDD) |
|||
* Raspberry Pi 3 B Plus - no LCD support so far |
|||
* hoping to extend this list with more compatible boards especially the ROCK64 |
|||
|
|||
See the hardware specs: [hardware specs](hw_comparison.md). |
|||
|
|||
|
|||
![](pictures/DroidBlitz.jpg) |
|||
|
|||
|
|||
## Setting up the DietPi OS |
|||
|
|||
### Download the updated DietPi image |
|||
|
|||
For the Odroid HC1 / HC2 / XU3 / XU4 a v6.20.6 DietPi image with fail2ban installed is uploaded here: |
|||
https://mega.nz/#!AcdVBAbR!O-W3jP5LUgw7lMY8S9XcBWcKX3IhRNAAFmaYzDXIUC0 |
|||
|
|||
Burn the SDCard with [Etcher](https://www.balena.io/etcher/) and extend the rootfs partition to the size of your card with a partition manager. |
|||
|
|||
Insert the SDcard into the Odroid. |
|||
|
|||
Power up and continue with: [Run the DietPi optimized Raspiblitz SDcard build script](#Run-the-DietPi-optimized-Raspiblitz-SDcard-build-script) |
|||
|
|||
### Build your own DietPi image: |
|||
|
|||
For the Odroid HC1 / HC2 / XU3 / XU4 download this image: |
|||
https://dietpi.com/downloads/images/DietPi_OdroidXU4-ARMv7-Stretch.7z |
|||
and burn it to the SD with [Etcher](https://www.balena.io/etcher/) |
|||
|
|||
Getting started with DietPi: https://dietpi.com/phpbb/viewtopic.php?f=8&t=9#p9 |
|||
|
|||
In the desktop terminal on Linux / MacOS or Putty on Windows: |
|||
|
|||
`ssh root@[IP-OF-DIETPI]` |
|||
password: `dietpi` |
|||
|
|||
Ok > Cancel > Cancel |
|||
automatic apt update & apt upgrade and asks to reboot |
|||
![](pictures/dietpi_1st_reboot.png) |
|||
|
|||
`ssh root@[IP-OF-DIETPI]` |
|||
after the previous update the ssh keys might change: |
|||
|
|||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|||
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ |
|||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|||
|
|||
run (can be copied from the terminal output): |
|||
`ssh-keygen -f "/home/[your-linux-username]/.ssh/known_hosts" -R "dietpi.IP"` |
|||
|
|||
`ssh root@[IP-OF-DIETPI]` |
|||
yes > |
|||
password: `dietpi` |
|||
|
|||
At this point if the DietPi was not updated from 6.14 it does not manage to save settings going forward. |
|||
Exit the sotware installer (press Tab to jump to Exit) |
|||
![](pictures/dietpi-software_exit.png) |
|||
|
|||
in the bash prompt run: |
|||
`dietpi-update` |
|||
>Ok > Cancel the recovery point |
|||
update > >Opt out of survey > Ok |
|||
Reboots |
|||
|
|||
`ssh root@[IP-OF-DIETPI]` |
|||
password: `dietpi` |
|||
|
|||
>Ok > Cancel > Cancel |
|||
Search `fail2ban` > Space to select > Enter |
|||
> Install > Ok |
|||
>Opt out of survey > Ok |
|||
Reboots again |
|||
|
|||
## Run the DietPi optimized Raspiblitz SDcard build script |
|||
|
|||
In the desktop terminal in Linux / MacOS or Putty in Windows: |
|||
|
|||
`ssh root@[IP-OF-DIETPI]` |
|||
password: `dietpi` |
|||
Should end up here on version v6.20.6 or higher: |
|||
![](pictures/bash_prompt.png) |
|||
|
|||
run the SDcard build script in this format: |
|||
`wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh [BRANCH] [GITHUB-USERNAME]` |
|||
|
|||
Be aware of that the fork needs to be called `raspiblitz` for the git download to work. |
|||
if you intend to use @openoms`s forked version: |
|||
|
|||
`wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh raspiblitz-dev openoms` |
|||
|
|||
See my example output on the Odorid HC1: [HC1_sdcard_build_output](logs/HC1_sdcard_build_output) |
|||
|
|||
`ssh admin@[IP-OF-DROIDBLITZ]` |
|||
password: raspiblitz |
|||
|
|||
### The setup continues as described in the RaspiBlitz setup [README.md](/README.md#documentation) |
|||
|
|||
### Examples of copying the blockchain data from a HDD using a powered USB to SATA adapter |
|||
|
|||
![copy the blockchain from a HDD of a Raspiblitz](pictures/5_options_to_copy.png) |
|||
![example setup](pictures/HDD_copy_example.jpg) |
|||
![](pictures/adapterHDD_HC1.jpg) |
|||
|
|||
### Useful commands for debugging: |
|||
To test a new configuration run XXcleanHDD.sh and strictly restart |
|||
(this makes _bootstrap.sh and 00mainMenu.sh run in the right order) |
|||
|
|||
`tail -n1000 -f /var/tmp/dietpi/logs/dietpi-automation_custom_script.log` follow startup setup script log |
|||
`lsblk` see the partitions |
|||
`tail -n1000 -f raspiblitz.log` - debug logs of bootstrap.sh |
|||
`sudo tail -f /mnt/hdd/bitcoin/debug.log` - continuous monitoring |
|||
`sudo tail -n100 /mnt/hdd/bitcoin/debug.log` - shows the last 100 lines |
|||
`sudo systemctl status lnd` |
|||
`sudo journalctl -f -u lnd` |
|||
`./home/admin/XXdebugLogs.sh` - debug log collection on the raspiblitz |
|||
|
|||
--- |
|||
|
|||
Currently the DietPi update process has a bug causing bootloop if left alone. Will be sorted once the current, >6.2 version is uploaded as the starting image. |
|||
Here find some excerpts from the deafult dietpi.txt (https://github.com/Fourdee/DietPi/blob/master/dietpi.txt) to be used once the automatic install is feasible: |
|||
|
|||
### Automate installation with the dietpi.txt |
|||
Need to copy to SDcard /boot/dietpi.txt after burning the image with Etcher. |
|||
IMPORTANT: |
|||
- Modifications to /boot/dietpi.txt will not be preserved on reboot. |
|||
- Please ensure you edit from the DietPi-RAMdisk location: /DietPi/dietpi.txt |
|||
NB: This is intended for advanced users, unless you know what you are doing, do not edit this file. ease use the DietPi programs instead. |
|||
NB: Do not remove uncommented lines, as the items are scraped by DietPi programs, on demand. |
|||
DietPi-Automation settings, applied on the 1st boot of DietPi, ONCE |
|||
Sample: |
|||
https://github.com/Fourdee/DietPi/blob/master/dietpi.txt |
|||
|
|||
### DietPi-Software to automatically install. |
|||
Requires `AUTO_SETUP_AUTOMATED=1 ` |
|||
For a list of software index's (ID's), run '/DietPi/dietpi/dietpi-software list' |
|||
No limit on number entries, add as many as you need and uncomment the line. |
|||
DietPi will automatically install all pre-reqs (eg: ALSA/XSERVER for desktops etc) |
|||
>install fail2ban |
|||
AUTO_SETUP_INSTALL_SOFTWARE_ID=73 |
|||
install OpenSSH Client |
|||
AUTO_SETUP_INSTALL_SOFTWARE_ID=0 |
|||
install OpenSSH Server |
|||
AUTO_SETUP_INSTALL_SOFTWARE_ID=105 |
|||
|
|||
|
|||
### Custom Script (post-networking and post-DietPi install) |
|||
Runs after DietPi installation is completed |
|||
Allows you to automatically execute a custom script at the end of DietPi installation. |
|||
Option 1 = Copy your script to /boot/Automation_Custom_Script.sh and it will be executed automatically. |
|||
Option 2 = Host your script online, then use AUTO_SETUP_CUSTOM_SCRIPT_EXEC=http://myweb.com/myscript.sh, it will be downloaded and executed automatically. | 0=disabled |
|||
NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_script.log |
@ -0,0 +1 @@ |
|||
wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh raspiblitz-dev openoms |
@ -0,0 +1,264 @@ |
|||
# IMPORTANT: |
|||
# - Modifications to /boot/dietpi.txt will not be preserved on reboot. |
|||
# - Please ensure you edit from the DietPi-RAMdisk location: /DietPi/dietpi.txt |
|||
|
|||
# NB: This is intended for advanced users, unless you know what you are doing, do not edit this file. Please use the DietPi programs instead. |
|||
# NB: Do not remove uncommented lines, as the items are scraped by DietPi programs, on demand. |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# DietPi-Automation settings, applied on the 1st boot of DietPi, ONCE |
|||
#------------------------------------------------------------------------------------------------------ |
|||
|
|||
##### Networking Options ##### |
|||
|
|||
# If both Ethernet and Wifi are enabled, Wifi will take priority and Ethernet will be disabled. |
|||
# 1=enabled |
|||
AUTO_SETUP_NET_ETHERNET_ENABLED=1 |
|||
AUTO_SETUP_NET_WIFI_ENABLED=0 |
|||
|
|||
# If using WiFi, please edit the following to pre-enter creds /boot/dietpi-wifi.txt |
|||
|
|||
# Enter your Static Network details below, if applicable. |
|||
AUTO_SETUP_NET_USESTATIC=0 |
|||
AUTO_SETUP_NET_STATIC_IP=192.168.0.100 |
|||
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0 |
|||
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.0.1 |
|||
AUTO_SETUP_NET_STATIC_DNS=8.8.8.8 |
|||
|
|||
# Hostname |
|||
AUTO_SETUP_NET_HOSTNAME=DietPi |
|||
|
|||
# Force ethernet speeds |
|||
# NB: This is mainly aimed at Pine A64's which may have an HW issue that causes unstable 1Gbit link. |
|||
# 0=automatic speed | 10 = 10mbit, 100 = 100mbit etc |
|||
AUTO_SETUP_NET_ETH_FORCE_SPEED=0 |
|||
|
|||
##### Misc Options ##### |
|||
|
|||
# Size of swapfile to generate (MB) |
|||
# 0=Disabled | 1=auto (2GB-RAM = size) | 2+=manual |
|||
AUTO_SETUP_SWAPFILE_SIZE=1 |
|||
# Optional swapfile location |
|||
AUTO_SETUP_SWAPFILE_LOCATION=/var/swap |
|||
|
|||
# Unmask (enable) systemd-logind service, which is masked by default on DietPi |
|||
AUTO_UNMASK_LOGIND=0 |
|||
|
|||
##### Software Automation Options ##### |
|||
|
|||
# Fully automate the installation |
|||
# 1=Automated installation with no user inputs. |
|||
# It is HIGHLY recommended to also set CONFIG_BOOT_WAIT_FOR_NETWORK=2, to force infinite wait for network connection during boot, preventing no connection errors due to timeout. |
|||
AUTO_SETUP_AUTOMATED=1 |
|||
|
|||
# Global Password to be applied for the system |
|||
# Requires AUTO_SETUP_AUTOMATED=1 |
|||
# Affects user "root" and "dietpi" login passwords, and, all software installed by dietpi-software, that requires a password |
|||
# eg: MySQL, Transmission, Deluge etc. |
|||
# WARN: Passwords with the any of the following characters are not supported: \"$ |
|||
# WARN: Do NOT change this entry after 1st run setup of DietPi has been completed. It is always scraped by dietpi-software. |
|||
AUTO_SETUP_GLOBAL_PASSWORD=dietpi |
|||
|
|||
# DietPi-Software to automatically install. | requires AUTO_SETUP_AUTOMATED=1 |
|||
# For a list of software index's (ID's), run '/DietPi/dietpi/dietpi-software list' |
|||
# No limit on number entries, add as many as you need and uncomment the line. |
|||
# DietPi will automatically install all pre-reqs (eg: ALSA/XSERVER for desktops etc) |
|||
# - Examples: |
|||
#AUTO_SETUP_INSTALL_SOFTWARE_ID=23 #will install Desktop LXDE |
|||
#AUTO_SETUP_INSTALL_SOFTWARE_ID=74 #will install LAMP webserver stack |
|||
#AUTO_SETUP_INSTALL_SOFTWARE_ID=44 #will install Bittorrent transmission |
|||
# install fail2ban |
|||
AUTO_SETUP_INSTALL_SOFTWARE_ID=73 |
|||
# install OpenSSH Client |
|||
# AUTO_SETUP_INSTALL_SOFTWARE_ID=0 |
|||
# install OpenSSH Server |
|||
# AUTO_SETUP_INSTALL_SOFTWARE_ID=105 |
|||
|
|||
|
|||
|
|||
# DietPi-Software Choice System |
|||
# SSH Server Selection: |
|||
# 0=none |
|||
# -1=dropbear |
|||
# -2=opensshserver |
|||
AUTO_SETUP_SSH_SERVER_INDEX=-1 |
|||
|
|||
# File Server Selection: |
|||
# 0=none/manual |
|||
# -1=proftp |
|||
# -2=samba |
|||
AUTO_SETUP_FILE_SERVER_INDEX=0 |
|||
|
|||
# Logging Mode Selection: |
|||
# 0=none/manual |
|||
# -1=ramlog 1h clear |
|||
# -2=ramlog 1h save clear |
|||
# -3=logrotate + rsyslog |
|||
AUTO_SETUP_LOGGING_INDEX=-1 |
|||
# RAMlog max tmpfs size (MB). 50MB should be fine for single use. 200MB+ for heavy webserver and access log use etc. |
|||
AUTO_SETUP_RAMLOG_MAXSIZE=50 |
|||
|
|||
# Webserver Preference Selection: |
|||
# NB: This will get ignored, if you have manually selected any WEBSERVER_Stack. |
|||
# 0=Apache2 |
|||
# -1=Nginx |
|||
# -2=Lighttpd |
|||
AUTO_SETUP_WEB_SERVER_INDEX=-2 |
|||
|
|||
# DietPi-Autostart | Requires AUTO_SETUP_AUTOMATED=1 |
|||
# After installation is completed, which program should the system boot to? |
|||
# 0=Console 7=Console+auto root login | 1=Kodi 2=Desktops (LXDE/MATE etc) 5=DietPi-Cloudshell 6=Uae4ARM (Fastboot) 8=Uae4ARM (standard boot) 9=dxx-rebirth |
|||
AUTO_SETUP_AUTOSTART_TARGET_INDEX=0 |
|||
|
|||
# Language/Regional settings | Requires AUTO_SETUP_AUTOMATED=1 |
|||
# Timezone eg: Europe/London America/New_York | Full list (TZ*): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones |
|||
AUTO_SETUP_TIMEZONE=Europe/London |
|||
# Locale eg: en_GB.UTF-8 / en_US.UTF-8 etc. One entry ONLY. |
|||
AUTO_SETUP_LOCALE=en_GB.UTF-8 |
|||
# Keyboard Layout eg: gb us de fr |
|||
AUTO_SETUP_KEYBOARD_LAYOUT=gb |
|||
|
|||
# Custom Script (pre-networking and pre-DietPi install) | Runs before DietPi installation and networking |
|||
# Allows you to automatically execute a custom script before networking and DietPi installation is started |
|||
# Option 1 = Copy your script to /boot/Automation_Custom_PreScript.sh and it will be executed automatically. |
|||
# NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_prescript.log |
|||
|
|||
# Custom Script (post-networking and post-DietPi install) | Runs after DietPi installation is completed |
|||
# Allows you to automatically execute a custom script at the end of DietPi installation. |
|||
# Option 1 = Copy your script to /boot/Automation_Custom_Script.sh and it will be executed automatically. |
|||
# Option 2 = Host your script online, then use AUTO_SETUP_CUSTOM_SCRIPT_EXEC=http://myweb.com/myscript.sh , it will be downloaded and executed automatically. | 0=disabled |
|||
# NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_script.log |
|||
AUTO_SETUP_CUSTOM_SCRIPT_EXEC=0 |
|||
|
|||
#Disable HDMI (and GPU/VPU where supported) output for supported devices: |
|||
# RPi | Odroid C1 | Odroid C2 |
|||
AUTO_SETUP_HEADLESS=0 |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# DietPi-Config settings |
|||
#------------------------------------------------------------------------------------------------------ |
|||
|
|||
#Cpu Governor | ondemand | powersave | performance | conservative |
|||
CONFIG_CPU_GOVERNOR=ondemand |
|||
CONFIG_CPU_USAGE_THROTTLE_UP=50 |
|||
|
|||
#CPU Frequency Limits |
|||
# NB: Intel CPU's use a percentage value (%) from 0-100 (eg: 55) |
|||
# NB: All other devices must use a specific MHz value (eg: 1600) |
|||
# Limit the MAX CPU frequency for all cores | Disabled=disabled |
|||
CONFIG_CPU_MAX_FREQ=Disabled |
|||
# Limit the MIN CPU frequency for all cores | Disabled=disabled |
|||
CONFIG_CPU_MIN_FREQ=Disabled |
|||
|
|||
# Disable Intel-based turbo/boost stepping. This flag should not be required, setting <100% MAX frequency should disable Turbo on Intel CPU's. |
|||
CONFIG_CPU_DISABLE_TURBO=0 |
|||
|
|||
#Min value 10000 microseconds (10ms) |
|||
CONFIG_CPU_ONDEMAND_SAMPLE_RATE=25000 |
|||
|
|||
#sampling rate * down factor / 1000 = Milliseconds (40 = 1000ms when sampling rate is 25000) |
|||
CONFIG_CPU_ONDEMAND_SAMPLE_DOWNFACTOR=80 |
|||
|
|||
#Proxy settings | System-wide proxy settings. Use dietpi-config > networking options to apply. |
|||
# NB: Do not modify, you must use dietpi-config to configure/set options |
|||
CONFIG_PROXY_ENABLED=0 |
|||
CONFIG_PROXY_ADDRESS=MyProxyServer.com |
|||
CONFIG_PROXY_PORT=8080 |
|||
CONFIG_PROXY_USERNAME= |
|||
CONFIG_PROXY_PASSWORD= |
|||
|
|||
#Delay boot until network is established: 0=disabled | 1=10 second wait max (default) | 2=infinite wait |
|||
CONFIG_BOOT_WAIT_FOR_NETWORK=2 |
|||
|
|||
#DietPi checks for updates (allows dietpi to check for updates on a daily basis and boot using a <1kb file download.) |
|||
CONFIG_CHECK_DIETPI_UPDATES=1 |
|||
# Optional: Automatically update DietPi when updates are available. | requires CONFIG_CHECK_DIETPI_UPDATES=1 |
|||
CONFIG_AUTO_DIETPI_UPDATES=0 |
|||
|
|||
#NTPD Update Mode: 0=disabled | 1=boot only | 2=boot + daily | 3=boot + hourly | 4=Daemon + Drift |
|||
CONFIG_NTP_MODE=2 |
|||
|
|||
#WiFi country code. 2 character value (eg GB US DE JP): https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 |
|||
CONFIG_WIFI_COUNTRY_CODE=GB |
|||
|
|||
#Serial Console: Set to 0 if you do not require serial console. |
|||
CONFIG_SERIAL_CONSOLE_ENABLE=1 |
|||
|
|||
#Soundcard |
|||
CONFIG_SOUNDCARD=none |
|||
|
|||
#LCD Panel addon |
|||
# NB: Do not modify, you must use dietpi-config to configure/set options |
|||
CONFIG_LCDPANEL=none |
|||
|
|||
#IPv6 |
|||
CONFIG_ENABLE_IPV6=1 |
|||
|
|||
#Prefer IPv4 with APT and wget, NB: This has no effect if IPv6 is disabled anyway! |
|||
CONFIG_PREFER_IPV4=1 |
|||
|
|||
#APT mirrors which are applied to /etc/apt/sources.list | Values here will also be applied during 1st run setup |
|||
# Raspbian = https://www.raspbian.org/RaspbianMirrors |
|||
# Debian = https://www.debian.org/mirror/official#list |
|||
CONFIG_APT_RASPBIAN_MIRROR=http://raspbian.raspberrypi.org/raspbian |
|||
CONFIG_APT_DEBIAN_MIRROR=https://deb.debian.org/debian/ |
|||
|
|||
#NTPD mirror, applied to /etc/ntp.conf |
|||
# For a full list, please see http://www.pool.ntp.org |
|||
# Please remove the initial integer and full stop from the value (removing 0.). eg: debian.pool.ntp.org |
|||
CONFIG_NTP_MIRROR=debian.pool.ntp.org |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# DietPi-Software settings |
|||
#------------------------------------------------------------------------------------------------------ |
|||
#Enter your EmonCMS.org write API key here. It will be applied automatically during EmonPi/Hub installation. |
|||
# eg: SOFTWARE_EMONHUB_APIKEY=b4dfmk2o203mmxx93a |
|||
SOFTWARE_EMONHUB_APIKEY= |
|||
|
|||
#VNC Server Options |
|||
SOFTWARE_VNCSERVER_WIDTH=1280 |
|||
SOFTWARE_VNCSERVER_HEIGHT=720 |
|||
SOFTWARE_VNCSERVER_DEPTH=16 |
|||
SOFTWARE_VNCSERVER_DISPLAY_INDEX=1 |
|||
SOFTWARE_VNCSERVER_SHARE_DESKTOP=0 |
|||
|
|||
#Optional username for ownCloud/Nextcloud admin account, the default is 'admin'. Applied during installation. |
|||
SOFTWARE_OWNCLOUD_NEXTCLOUD_USERNAME=admin |
|||
|
|||
#Optional data directory for ownCloud, default is '/mnt/dietpi_userdata/owncloud_data'. Applied during installation. |
|||
# This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location. |
|||
SOFTWARE_OWNCLOUD_DATADIR=/mnt/dietpi_userdata/owncloud_data |
|||
|
|||
#Optional data directory for Nextcloud, default is '/mnt/dietpi_userdata/nextcloud_data'. Applied during installation. |
|||
# This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location. |
|||
SOFTWARE_NEXTCLOUD_DATADIR=/mnt/dietpi_userdata/nextcloud_data |
|||
|
|||
#Wifi Hotspot |
|||
SOFTWARE_WIFI_HOTSPOT_SSID=DietPi-HotSpot |
|||
# minimum of 8 characters |
|||
SOFTWARE_WIFI_HOTSPOT_KEY=dietpihotspot |
|||
SOFTWARE_WIFI_HOTSPOT_CHANNEL=3 |
|||
|
|||
#Xorg options |
|||
# DPI 96(default) 120(+25%) 144(+50%) 168(+75%) 192(+100%) |
|||
SOFTWARE_XORG_DPI=96 |
|||
|
|||
#Chromium Options |
|||
SOFTWARE_CHROMIUM_RES_X=1280 |
|||
SOFTWARE_CHROMIUM_RES_Y=720 |
|||
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://google.com |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# Dev settings |
|||
#------------------------------------------------------------------------------------------------------ |
|||
DEV_GITBRANCH=master |
|||
DEV_GITOWNER=Fourdee |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# Settings, automatically added by dietpi-update |
|||
#------------------------------------------------------------------------------------------------------ |
@ -0,0 +1,256 @@ |
|||
# IMPORTANT: |
|||
# - Modifications to /boot/dietpi.txt will not be preserved on reboot. |
|||
# - Please ensure you edit from the DietPi-RAMdisk location: /DietPi/dietpi.txt |
|||
|
|||
# NB: This is intended for advanced users, unless you know what you are doing, do not edit this file. Please use the DietPi programs instead. |
|||
# NB: Do not remove uncommented lines, as the items are scraped by DietPi programs, on demand. |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# DietPi-Automation settings, applied on the 1st boot of DietPi, ONCE |
|||
#------------------------------------------------------------------------------------------------------ |
|||
|
|||
##### Networking Options ##### |
|||
|
|||
# If both Ethernet and Wifi are enabled, Wifi will take priority and Ethernet will be disabled. |
|||
# 1=enabled |
|||
AUTO_SETUP_NET_ETHERNET_ENABLED=1 |
|||
AUTO_SETUP_NET_WIFI_ENABLED=0 |
|||
|
|||
# If using WiFi, please edit the following to pre-enter creds /boot/dietpi-wifi.txt |
|||
|
|||
# Enter your Static Network details below, if applicable. |
|||
AUTO_SETUP_NET_USESTATIC=0 |
|||
AUTO_SETUP_NET_STATIC_IP=192.168.0.100 |
|||
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0 |
|||
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.0.1 |
|||
AUTO_SETUP_NET_STATIC_DNS=8.8.8.8 |
|||
|
|||
# Hostname |
|||
AUTO_SETUP_NET_HOSTNAME=DietPi |
|||
|
|||
# Force ethernet speeds |
|||
# NB: This is mainly aimed at Pine A64's which may have an HW issue that causes unstable 1Gbit link. |
|||
# 0=automatic speed | 10 = 10mbit, 100 = 100mbit etc |
|||
AUTO_SETUP_NET_ETH_FORCE_SPEED=0 |
|||
|
|||
##### Misc Options ##### |
|||
|
|||
# Size of swapfile to generate (MB) |
|||
# 0=Disabled | 1=auto (2GB-RAM = size) | 2+=manual |
|||
AUTO_SETUP_SWAPFILE_SIZE=1 |
|||
# Optional swapfile location |
|||
AUTO_SETUP_SWAPFILE_LOCATION=/var/swap |
|||
|
|||
# Unmask (enable) systemd-logind service, which is masked by default on DietPi |
|||
AUTO_UNMASK_LOGIND=0 |
|||
|
|||
##### Software Automation Options ##### |
|||
|
|||
# Fully automate the installation |
|||
# 1=Automated installation with no user inputs. |
|||
# It is HIGHLY recommended to also set CONFIG_BOOT_WAIT_FOR_NETWORK=2, to force infinite wait for network connection during boot, preventing no connection errors due to timeout. |
|||
AUTO_SETUP_AUTOMATED=0 |
|||
|
|||
# Global Password to be applied for the system |
|||
# Requires AUTO_SETUP_AUTOMATED=1 |
|||
# Affects user "root" and "dietpi" login passwords, and, all software installed by dietpi-software, that requires a password |
|||
# eg: MySQL, Transmission, Deluge etc. |
|||
# WARN: Passwords with the any of the following characters are not supported: \"$ |
|||
# WARN: Do NOT change this entry after 1st run setup of DietPi has been completed. It is always scraped by dietpi-software. |
|||
AUTO_SETUP_GLOBAL_PASSWORD=dietpi |
|||
|
|||
# DietPi-Software to automatically install. | requires AUTO_SETUP_AUTOMATED=1 |
|||
# For a list of software index's (ID's), run '/DietPi/dietpi/dietpi-software list' |
|||
# No limit on number entries, add as many as you need and uncomment the line. |
|||
# DietPi will automatically install all pre-reqs (eg: ALSA/XSERVER for desktops etc) |
|||
# - Examples: |
|||
#AUTO_SETUP_INSTALL_SOFTWARE_ID=23 #will install Desktop LXDE |
|||
#AUTO_SETUP_INSTALL_SOFTWARE_ID=74 #will install LAMP webserver stack |
|||
#AUTO_SETUP_INSTALL_SOFTWARE_ID=44 #will install Bittorrent transmission |
|||
|
|||
# DietPi-Software Choice System |
|||
# SSH Server Selection: |
|||
# 0=none |
|||
# -1=dropbear |
|||
# -2=opensshserver |
|||
AUTO_SETUP_SSH_SERVER_INDEX=-1 |
|||
|
|||
# File Server Selection: |
|||
# 0=none/manual |
|||
# -1=proftp |
|||
# -2=samba |
|||
AUTO_SETUP_FILE_SERVER_INDEX=0 |
|||
|
|||
# Logging Mode Selection: |
|||
# 0=none/manual |
|||
# -1=ramlog 1h clear |
|||
# -2=ramlog 1h save clear |
|||
# -3=logrotate + rsyslog |
|||
AUTO_SETUP_LOGGING_INDEX=-1 |
|||
# RAMlog max tmpfs size (MB). 50MB should be fine for single use. 200MB+ for heavy webserver and access log use etc. |
|||
AUTO_SETUP_RAMLOG_MAXSIZE=50 |
|||
|
|||
# Webserver Preference Selection: |
|||
# NB: This will get ignored, if you have manually selected any WEBSERVER_Stack. |
|||
# 0=Apache2 |
|||
# -1=Nginx |
|||
# -2=Lighttpd |
|||
AUTO_SETUP_WEB_SERVER_INDEX=-2 |
|||
|
|||
# DietPi-Autostart | Requires AUTO_SETUP_AUTOMATED=1 |
|||
# After installation is completed, which program should the system boot to? |
|||
# 0=Console 7=Console+auto root login | 1=Kodi 2=Desktops (LXDE/MATE etc) 5=DietPi-Cloudshell 6=Uae4ARM (Fastboot) 8=Uae4ARM (standard boot) 9=dxx-rebirth |
|||
AUTO_SETUP_AUTOSTART_TARGET_INDEX=0 |
|||
|
|||
# Language/Regional settings | Requires AUTO_SETUP_AUTOMATED=1 |
|||
# Timezone eg: Europe/London America/New_York | Full list (TZ*): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones |
|||
AUTO_SETUP_TIMEZONE=Europe/London |
|||
# Locale eg: en_GB.UTF-8 / en_US.UTF-8 etc. One entry ONLY. |
|||
AUTO_SETUP_LOCALE=en_GB.UTF-8 |
|||
# Keyboard Layout eg: gb us de fr |
|||
AUTO_SETUP_KEYBOARD_LAYOUT=gb |
|||
|
|||
# Custom Script (pre-networking and pre-DietPi install) | Runs before DietPi installation and networking |
|||
# Allows you to automatically execute a custom script before networking and DietPi installation is started |
|||
# Option 1 = Copy your script to /boot/Automation_Custom_PreScript.sh and it will be executed automatically. |
|||
# NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_prescript.log |
|||
|
|||
# Custom Script (post-networking and post-DietPi install) | Runs after DietPi installation is completed |
|||
# Allows you to automatically execute a custom script at the end of DietPi installation. |
|||
# Option 1 = Copy your script to /boot/Automation_Custom_Script.sh and it will be executed automatically. |
|||
# Option 2 = Host your script online, then use AUTO_SETUP_CUSTOM_SCRIPT_EXEC=http://myweb.com/myscript.sh , it will be downloaded and executed automatically. | 0=disabled |
|||
# NB: Executed script log /var/tmp/dietpi/logs/dietpi-automation_custom_script.log |
|||
AUTO_SETUP_CUSTOM_SCRIPT_EXEC=0 |
|||
|
|||
#Disable HDMI (and GPU/VPU where supported) output for supported devices: |
|||
# RPi | Odroid C1 | Odroid C2 |
|||
AUTO_SETUP_HEADLESS=0 |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# DietPi-Config settings |
|||
#------------------------------------------------------------------------------------------------------ |
|||
|
|||
#Cpu Governor | ondemand | powersave | performance | conservative |
|||
CONFIG_CPU_GOVERNOR=ondemand |
|||
CONFIG_CPU_USAGE_THROTTLE_UP=50 |
|||
|
|||
#CPU Frequency Limits |
|||
# NB: Intel CPU's use a percentage value (%) from 0-100 (eg: 55) |
|||
# NB: All other devices must use a specific MHz value (eg: 1600) |
|||
# Limit the MAX CPU frequency for all cores | Disabled=disabled |
|||
CONFIG_CPU_MAX_FREQ=Disabled |
|||
# Limit the MIN CPU frequency for all cores | Disabled=disabled |
|||
CONFIG_CPU_MIN_FREQ=Disabled |
|||
|
|||
# Disable Intel-based turbo/boost stepping. This flag should not be required, setting <100% MAX frequency should disable Turbo on Intel CPU's. |
|||
CONFIG_CPU_DISABLE_TURBO=0 |
|||
|
|||
#Min value 10000 microseconds (10ms) |
|||
CONFIG_CPU_ONDEMAND_SAMPLE_RATE=25000 |
|||
|
|||
#sampling rate * down factor / 1000 = Milliseconds (40 = 1000ms when sampling rate is 25000) |
|||
CONFIG_CPU_ONDEMAND_SAMPLE_DOWNFACTOR=80 |
|||
|
|||
#Proxy settings | System-wide proxy settings. Use dietpi-config > networking options to apply. |
|||
# NB: Do not modify, you must use dietpi-config to configure/set options |
|||
CONFIG_PROXY_ENABLED=0 |
|||
CONFIG_PROXY_ADDRESS=MyProxyServer.com |
|||
CONFIG_PROXY_PORT=8080 |
|||
CONFIG_PROXY_USERNAME= |
|||
CONFIG_PROXY_PASSWORD= |
|||
|
|||
#Delay boot until network is established: 0=disabled | 1=10 second wait max (default) | 2=infinite wait |
|||
CONFIG_BOOT_WAIT_FOR_NETWORK=1 |
|||
|
|||
#DietPi checks for updates (allows dietpi to check for updates on a daily basis and boot using a <1kb file download.) |
|||
CONFIG_CHECK_DIETPI_UPDATES=1 |
|||
# Optional: Automatically update DietPi when updates are available. | requires CONFIG_CHECK_DIETPI_UPDATES=1 |
|||
CONFIG_AUTO_DIETPI_UPDATES=0 |
|||
|
|||
#NTPD Update Mode: 0=disabled | 1=boot only | 2=boot + daily | 3=boot + hourly | 4=Daemon + Drift |
|||
CONFIG_NTP_MODE=2 |
|||
|
|||
#WiFi country code. 2 character value (eg GB US DE JP): https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 |
|||
CONFIG_WIFI_COUNTRY_CODE=GB |
|||
|
|||
#Serial Console: Set to 0 if you do not require serial console. |
|||
CONFIG_SERIAL_CONSOLE_ENABLE=1 |
|||
|
|||
#Soundcard |
|||
CONFIG_SOUNDCARD=none |
|||
|
|||
#LCD Panel addon |
|||
# NB: Do not modify, you must use dietpi-config to configure/set options |
|||
CONFIG_LCDPANEL=none |
|||
|
|||
#IPv6 |
|||
CONFIG_ENABLE_IPV6=1 |
|||
|
|||
#Prefer IPv4 with APT and wget, NB: This has no effect if IPv6 is disabled anyway! |
|||
CONFIG_PREFER_IPV4=1 |
|||
|
|||
#APT mirrors which are applied to /etc/apt/sources.list | Values here will also be applied during 1st run setup |
|||
# Raspbian = https://www.raspbian.org/RaspbianMirrors |
|||
# Debian = https://www.debian.org/mirror/official#list |
|||
CONFIG_APT_RASPBIAN_MIRROR=http://raspbian.raspberrypi.org/raspbian |
|||
CONFIG_APT_DEBIAN_MIRROR=https://deb.debian.org/debian/ |
|||
|
|||
#NTPD mirror, applied to /etc/ntp.conf |
|||
# For a full list, please see http://www.pool.ntp.org |
|||
# Please remove the initial integer and full stop from the value (removing 0.). eg: debian.pool.ntp.org |
|||
CONFIG_NTP_MIRROR=debian.pool.ntp.org |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# DietPi-Software settings |
|||
#------------------------------------------------------------------------------------------------------ |
|||
#Enter your EmonCMS.org write API key here. It will be applied automatically during EmonPi/Hub installation. |
|||
# eg: SOFTWARE_EMONHUB_APIKEY=b4dfmk2o203mmxx93a |
|||
SOFTWARE_EMONHUB_APIKEY= |
|||
|
|||
#VNC Server Options |
|||
SOFTWARE_VNCSERVER_WIDTH=1280 |
|||
SOFTWARE_VNCSERVER_HEIGHT=720 |
|||
SOFTWARE_VNCSERVER_DEPTH=16 |
|||
SOFTWARE_VNCSERVER_DISPLAY_INDEX=1 |
|||
SOFTWARE_VNCSERVER_SHARE_DESKTOP=0 |
|||
|
|||
#Optional username for ownCloud/Nextcloud admin account, the default is 'admin'. Applied during installation. |
|||
SOFTWARE_OWNCLOUD_NEXTCLOUD_USERNAME=admin |
|||
|
|||
#Optional data directory for ownCloud, default is '/mnt/dietpi_userdata/owncloud_data'. Applied during installation. |
|||
# This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location. |
|||
SOFTWARE_OWNCLOUD_DATADIR=/mnt/dietpi_userdata/owncloud_data |
|||
|
|||
#Optional data directory for Nextcloud, default is '/mnt/dietpi_userdata/nextcloud_data'. Applied during installation. |
|||
# This option is for advanced users. For full compatibility, please keep this options defaults, and, use dietpi-drive_manager to move the DietPi user data location. |
|||
SOFTWARE_NEXTCLOUD_DATADIR=/mnt/dietpi_userdata/nextcloud_data |
|||
|
|||
#Wifi Hotspot |
|||
SOFTWARE_WIFI_HOTSPOT_SSID=DietPi-HotSpot |
|||
# minimum of 8 characters |
|||
SOFTWARE_WIFI_HOTSPOT_KEY=dietpihotspot |
|||
SOFTWARE_WIFI_HOTSPOT_CHANNEL=3 |
|||
|
|||
#Xorg options |
|||
# DPI 96(default) 120(+25%) 144(+50%) 168(+75%) 192(+100%) |
|||
SOFTWARE_XORG_DPI=96 |
|||
|
|||
#Chromium Options |
|||
SOFTWARE_CHROMIUM_RES_X=1280 |
|||
SOFTWARE_CHROMIUM_RES_Y=720 |
|||
SOFTWARE_CHROMIUM_AUTOSTART_URL=https://google.com |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# Dev settings |
|||
#------------------------------------------------------------------------------------------------------ |
|||
DEV_GITBRANCH=master |
|||
DEV_GITOWNER=Fourdee |
|||
|
|||
#------------------------------------------------------------------------------------------------------ |
|||
# D I E T - P I |
|||
# Settings, automatically added by dietpi-update |
|||
#------------------------------------------------------------------------------------------------------ |
After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
Before Width: | Height: | Size: 3.2 MiB After Width: | Height: | Size: 3.2 MiB |
After Width: | Height: | Size: 2.0 MiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 13 KiB |
@ -0,0 +1,208 @@ |
|||
#!/bin/bash |
|||
|
|||
## get basic info |
|||
source /home/admin/raspiblitz.info 2>/dev/null |
|||
|
|||
echo "" |
|||
echo "*** Check 1st HDD ***" |
|||
sleep 4 |
|||
hddA=$(lsblk | grep /mnt/hdd | grep -c sda1) |
|||
if [ ${hddA} -eq 0 ]; then |
|||
echo "FAIL - 1st HDD not found as sda1" |
|||
echo "Try 'sudo shutdown -r now'" |
|||
exit 1 |
|||
fi |
|||
|
|||
ready=0 |
|||
while [ ${ready} -eq 0 ] |
|||
do |
|||
hddA=$(lsblk | grep /mnt/hdd | grep -c sda1) |
|||
if [ ${hddA} -eq 1 ]; then |
|||
echo "OK - HDD as sda1 found" |
|||
ready=1 |
|||
fi |
|||
if [ ${hddA} -eq 0 ]; then |
|||
echo "FAIL - 1st HDD not found as sda1 or sda" |
|||
echo "Try 'sudo shutdown -r now'" |
|||
exit 1 |
|||
fi |
|||
hddB=$(lsblk | grep -c sda) |
|||
if [ ${hddB} -eq 1 ]; then |
|||
echo "OK - HDD as sda found" |
|||
ready=1 |
|||
fi |
|||
done |
|||
|
|||
echo "" |
|||
echo "*** Copy Blockchain form a second HDD ***" |
|||
echo "" |
|||
echo "WARNING: The RaspiBlitz cannot run 2 HDDs without extra Power!" |
|||
echo "" |
|||
echo "You can use a Y cable for the second HDD to inject extra power." |
|||
echo "Like this one: https://www.amazon.de/dp/B00ZJBIHVY" |
|||
echo "If you see on LCD a error on connecting the 2nd HDD do a restart." |
|||
echo "" |
|||
echo "You can use the HDD of another RaspiBlitz for this." |
|||
echo "The 2nd HDD needs to be formatted Ext4/exFAT and the folder '${network}' is in root of HDD." |
|||
echo "The the folder '${network}' needs to be in root of the 1st or 2nd partition on the HDD." |
|||
echo "" |
|||
echo "**********************************" |
|||
echo "--> Please connect now the 2nd HDD" |
|||
echo "**********************************" |
|||
echo "" |
|||
echo "If 2nd HDD is connected but setup does not continue," |
|||
echo "then cancel (CTRL+c) and reboot." |
|||
ready=0 |
|||
while [ ${ready} -eq 0 ] |
|||
do |
|||
hddC=$(lsblk | grep -c sdb1) |
|||
if [ ${hddC} -eq 1 ]; then |
|||
echo "OK - 2nd HDD found as sdb1" |
|||
ready=1 |
|||
fi |
|||
hddD=$(lsblk | grep -c sdb) |
|||
if [ ${hddD} -eq 1 ]; then |
|||
echo "OK - 2nd HDD found as sdb" |
|||
ready=1 |
|||
fi |
|||
done |
|||
|
|||
echo "" |
|||
echo "*** Mounting 2nd HDD ***" |
|||
sudo mkdir /mnt/genesis |
|||
echo "try ext4 on sdb1 .." |
|||
sudo mount -t ext4 /dev/sdb1 /mnt/genesis |
|||
sleep 2 |
|||
mountOK=$(lsblk | grep -c /mnt/genesis) |
|||
if [ ${mountOK} -eq 0 ]; then |
|||
echo "try exfat on sdb1 .." |
|||
sudo mount -t exfat /dev/sdb1 /mnt/genesis |
|||
sleep 2 |
|||
fi |
|||
mountOK=$(lsblk | grep -c /mnt/genesis) |
|||
if [ ${mountOK} -eq 0 ]; then |
|||
echo "try ext4 on sdb .." |
|||
sudo mount -t ext4 /dev/sdb /mnt/genesis |
|||
sleep 2 |
|||
fi |
|||
mountOK=$(lsblk | grep -c /mnt/genesis) |
|||
if [ ${mountOK} -eq 0 ]; then |
|||
echo "try exfat on sdb.." |
|||
sudo mount -t exfat /dev/sdb /mnt/genesis |
|||
sleep 2 |
|||
fi |
|||
mountOK=$(lsblk | grep -c /mnt/genesis) |
|||
if [ ${mountOK} -eq 0 ]; then |
|||
echo "FAIL - not able to mount the 2nd HDD" |
|||
echo "only ext4 and exfat possible" |
|||
sleep 4 |
|||
./10setupBlitz.sh |
|||
exit 1 |
|||
else |
|||
echo "OK - 2nd HDD mounted at /mnt/genesis" |
|||
fi |
|||
|
|||
echo "" |
|||
echo "*** Copy Blockchain ***" |
|||
sudo rsync --append --info=progress2 -a /mnt/genesis/bitcoin/chainstate /mnt/hdd/bitcoin |
|||
sudo rsync --append --info=progress2 -a /mnt/genesis/bitcoin/indexes /mnt/hdd/bitcoin |
|||
sudo rsync --append --info=progress2 -a /mnt/genesis/bitcoin/testnet3 /mnt/hdd/bitcoin |
|||
sudo rsync --append --info=progress2 -a /mnt/genesis/bitcoin/blocks /mnt/hdd/bitcoin |
|||
|
|||
# echo "cleaning up - ok if files do not exists" |
|||
# sudo rm /mnt/hdd/${network}/${network}.conf |
|||
# sudo rm /mnt/hdd/${network}/${network}.pid |
|||
# sudo rm /mnt/hdd/${network}/banlist.dat |
|||
# sudo rm /mnt/hdd/${network}/debug.log |
|||
# sudo rm /mnt/hdd/${network}/fee_estimates.dat |
|||
# sudo rm /mnt/hdd/${network}/mempool.dat |
|||
# sudo rm /mnt/hdd/${network}/peers.dat |
|||
# sudo rm /mnt/hdd/${network}/testnet3/banlist.dat |
|||
# sudo rm /mnt/hdd/${network}/testnet3/debug.log |
|||
# sudo rm /mnt/hdd/${network}/testnet3/fee_estimates.dat |
|||
# sudo rm /mnt/hdd/${network}/testnet3/mempool.dat |
|||
# sudo rm /mnt/hdd/${network}/testnet3/peers.dat |
|||
|
|||
sudo umount -l /mnt/genesis |
|||
echo "OK - Copy done :)" |
|||
echo "" |
|||
# echo "---> You can now disconnect the 2nd HDD" |
|||
# If the Odorid HC1 reboots with a HDD attached to the USB it prioritises it over the SATA |
|||
echo "---> Disconnect the 2nd HDD and press a Enter" |
|||
read key |
|||
|
|||
# set SetupState |
|||
# sudo sed -i "s/^setupStep=.*/setupStep=50/g" /home/admin/raspiblitz.info |
|||
|
|||
# sleep 5 |
|||
#./60finishHDD.sh |
|||
|
|||
# unlink bitcoin user (will created later in setup again) |
|||
sudo unlink /home/bitcoin/.bitcoin |
|||
|
|||
# make quick check if data is there |
|||
anyDataAtAll=0 |
|||
quickCheckOK=1 |
|||
count=$(sudo ls /mnt/hdd/bitcoin/blocks 2>/dev/null | grep -c '.dat') |
|||
if [ ${count} -gt 0 ]; then |
|||
echo "Found data in /mnt/hdd/bitcoin/blocks" |
|||
anyDataAtAll=1 |
|||
fi |
|||
if [ ${count} -lt 3000 ]; then |
|||
echo "FAIL: transfere seems invalid - less then 3000 .dat files (${count})" |
|||
quickCheckOK=0 |
|||
fi |
|||
count=$(sudo ls /mnt/hdd/bitcoin/chainstate 2>/dev/null | grep -c '.ldb') |
|||
if [ ${count} -gt 0 ]; then |
|||
echo "Found data in /mnt/hdd/bitcoin/chainstate" |
|||
anyDataAtAll=1 |
|||
fi |
|||
if [ ${count} -lt 1400 ]; then |
|||
echo "FAIL: transfere seems invalid - less then 1400 .ldb files (${count})" |
|||
quickCheckOK=0 |
|||
fi |
|||
count=$(sudo ls /mnt/hdd/bitcoin/indexes/txindex 2>/dev/null | grep -c '.ldb') |
|||
if [ ${count} -gt 0 ]; then |
|||
echo "Found data in /mnt/hdd/bitcoin/indexes/txindex" |
|||
anyDataAtAll=1 |
|||
fi |
|||
# if [ ${count} -lt 5200 ]; then |
|||
# echo "FAIL: less then 5200 .ldb files (${count}) in /mnt/hdd/bitcoin/chainstate (transfere seems invalid)" |
|||
if [ ${count} -lt 2300 ]; then |
|||
echo "FAIL: less then 2300 .ldb files (${count}) in /mnt/hdd/bitcoin/chainstate (transfere seems invalid)" |
|||
quickCheckOK=0 |
|||
fi |
|||
|
|||
# just if any data transferred .. |
|||
if [ ${anyDataAtAll} -eq 1 ]; then |
|||
|
|||
# data was invalid - ask user to keep? |
|||
if [ ${quickCheckOK} -eq 0 ]; then |
|||
echo "*********************************************" |
|||
echo "There seems to be an invalid transfer." |
|||
echo "Wait 5 secs ..." |
|||
sleep 5 |
|||
dialog --title " INVALID TRANSFER - DELETE DATA?" --yesno "Quickcheck shows the data you transferred is invalid/incomplete. This can lead further RaspiBlitz setup to get stuck in error state.\nDo you want to reset/delete data data?" 8 60 |
|||
response=$? |
|||
echo "response(${response})" |
|||
case $response in |
|||
1) quickCheckOK=1 ;; |
|||
esac |
|||
fi |
|||
|
|||
if [ ${quickCheckOK} -eq 0 ]; then |
|||
echo "Deleting invalid Data ..." |
|||
sudo rm -rf /mnt/hdd/bitcoin |
|||
sudo rm -rf /home/bitcoin/.bitcoin |
|||
sleep 2 |
|||
fi |
|||
|
|||
else |
|||
|
|||
# when no data transferred - just delete bitcoin base dir again |
|||
sudo rm -rf /mnt/hdd/bitcoin |
|||
|
|||
fi |
|||
|
|||
# setup script will decide the next logical step |
|||
./10setupBlitz.sh |
@ -1,222 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
# Background: |
|||
# https://medium.com/@lopp/how-to-run-bitcoin-as-a-tor-hidden-service-on-ubuntu-cff52d543756 |
|||
# https://bitcoin.stackexchange.com/questions/70069/how-can-i-setup-bitcoin-to-be-anonymous-with-tor |
|||
# https://github.com/lightningnetwork/lnd/blob/master/docs/configuring_tor.md |
|||
|
|||
|
|||
# load network |
|||
network=`cat .network` |
|||
chain="$(${network}-cli getblockchaininfo | jq -r '.chain')" |
|||
|
|||
# location of TOR config |
|||
torrc="/etc/tor/torrc" |
|||
|
|||
# check if TOR was already installed and is funtional |
|||
clear |
|||
echo "" |
|||
echo "*** Check if TOR service is functional ***" |
|||
torRunning=$(curl --connect-timeout 10 --socks5-hostname 127.0.0.1:9050 https://check.torproject.org | grep "Congratulations. This browser is configured to use Tor." -c) |
|||
if [ ${torRunning} -gt 0 ]; then |
|||
clear |
|||
echo "You are all good - TOR is already running." |
|||
echo "" |
|||
exit 0 |
|||
else |
|||
echo "TOR not running ... proceed with switching to TOR." |
|||
echo "" |
|||
fi |
|||
|
|||
# ask user if to proceed |
|||
dialog --title " WARNING " --yesno "At the moment you just can switch TOR on - YOU CANNOT SWITCH BACK. Do you want to proceed?" 8 57 |
|||
response=$? |
|||
case $response in |
|||
1) exit 1; |
|||
esac |
|||
|
|||
echo "*** Adding Tor Sources to sources.list ***" |
|||
echo "deb http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list |
|||
echo "deb-src http://deb.torproject.org/torproject.org stretch main" | sudo tee -a /etc/apt/sources.list |
|||
echo "OK" |
|||
echo "" |
|||
|
|||
echo "*** Installing dirmngr ***" |
|||
sudo apt install dirmngr |
|||
echo "" |
|||
|
|||
## lopp: gpg --keyserver keys.gnupg.net --recv 886DDD89 |
|||
echo "*** Fetching GPG key ***" |
|||
gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 |
|||
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - |
|||
echo "" |
|||
|
|||
echo "*** Updating System ***" |
|||
sudo apt-get update |
|||
echo "" |
|||
|
|||
echo "*** Install Tor ***" |
|||
sudo apt install tor tor-arm -y |
|||
|
|||
echo "" |
|||
echo "*** Tor Config ***" |
|||
sudo rm -r -f /mnt/hdd/tor 2>/dev/null |
|||
sudo mkdir /mnt/hdd/tor |
|||
sudo mkdir /mnt/hdd/tor/sys |
|||
sudo mkdir /mnt/hdd/tor/web80 |
|||
sudo mkdir /mnt/hdd/tor/lnd9735 |
|||
sudo mkdir /mnt/hdd/tor/lndrpc9735 |
|||
sudo chmod -R 700 /mnt/hdd/tor |
|||
sudo chown -R bitcoin:bitcoin /mnt/hdd/tor |
|||
cat > ./torrc <<EOF |
|||
### See 'man tor', or https://www.torproject.org/docs/tor-manual.html |
|||
|
|||
DataDirectory /mnt/hdd/tor/sys |
|||
PidFile /mnt/hdd/tor/sys/tor.pid |
|||
|
|||
SafeLogging 0 |
|||
Log notice stdout |
|||
Log notice file /mnt/hdd/tor/notice.log |
|||
Log info file /mnt/hdd/tor/info.log |
|||
|
|||
RunAsDaemon 1 |
|||
User bitcoin |
|||
PortForwarding 1 |
|||
ControlPort 9051 |
|||
SocksPort 9050 |
|||
|
|||
CookieAuthFile /mnt/hdd/tor/sys/control_auth_cookie |
|||
CookieAuthentication 1 |
|||
CookieAuthFileGroupReadable 1 |
|||
|
|||
# Hidden Service v2 for WEB ADMIN INTERFACE |
|||
HiddenServiceDir /mnt/hdd/tor/web80/ |
|||
HiddenServicePort 80 127.0.0.1:80 |
|||
|
|||
# Hidden Service v2 for LND RPC |
|||
HiddenServiceDir /mnt/hdd/tor/lndrpc10009/ |
|||
HiddenServicePort 80 127.0.0.1:10009 |
|||
|
|||
# Hidden Service v3 for LND incomming connections (just in case) |
|||
# https://trac.torproject.org/projects/tor/wiki/doc/NextGenOnions#Howtosetupyourownprop224service |
|||
HiddenServiceDir /mnt/hdd/tor/lnd9735 |
|||
HiddenServiceVersion 3 |
|||
HiddenServicePort 9735 127.0.0.1:9735 |
|||
|
|||
# NOTE: bitcoind get tor service automatically - see /mnt/hdd/bitcoin for onion key |
|||
EOF |
|||
sudo rm $torrc |
|||
sudo mv ./torrc $torrc |
|||
sudo chmod 644 $torrc |
|||
sudo chown -R bitcoin:bitcoin /var/run/tor/ |
|||
echo "" |
|||
|
|||
# NYX - Tor monitor tool |
|||
# https://nyx.torproject.org/#home |
|||
echo "*** Installing NYX - TOR monitoring Tool ***" |
|||
# install setuptools required by NYX |
|||
sudo pip install setuptools |
|||
nyxInstalled=$(sudo pip list 2>/dev/null | grep 'nyx' -c) |
|||
if [ ${nyxInstalled} -eq 0 ]; then |
|||
sudo pip install nyx |
|||
else |
|||
echo "NYX already installed" |
|||
fi |
|||
echo "" |
|||
|
|||
echo "*** Activating TOR system service ***" |
|||
echo "ReadWriteDirectories=-/mnt/hdd/tor" | sudo tee -a /lib/systemd/system/tor@default.service |
|||
sudo systemctl daemon-reload |
|||
sudo systemctl restart tor@default |
|||
echo "" |
|||
|
|||
echo "*** Waiting for TOR to boostrap ***" |
|||
torIsBootstrapped=0 |
|||
while [ ${torIsBootstrapped} -eq 0 ] |
|||
do |
|||
echo "--- Checking 1 ---" |
|||
date +%s |
|||
sudo cat /mnt/hdd/tor/notice.log 2>/dev/null | grep "Bootstrapped" | tail -n 10 |
|||
torIsBootstrapped=$(sudo cat /mnt/hdd/tor/notice.log 2>/dev/null | grep "Bootstrapped 100" -c) |
|||
echo "torIsBootstrapped(${torIsBootstrapped})" |
|||
echo "If this takes too long --> CTRL+c, reboot and check manually" |
|||
sleep 5 |
|||
done |
|||
echo "OK - Tor Bootstrap is ready" |
|||
echo "" |
|||
|
|||
echo "*** Changing ${network} Config ***" |
|||
networkIsTor=$(sudo cat /home/bitcoin/.${network}/${network}.conf | grep 'onlynet=onion' -c) |
|||
if [ ${networkIsTor} -eq 0 ]; then |
|||
|
|||
echo "Only Connect thru TOR" |
|||
echo "onlynet=onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
|
|||
if [ "${network}" = "bitcoin" ]; then |
|||
echo "Adding some bitcoin onion nodes to connect to" |
|||
echo "addnode=fno4aakpl6sg6y47.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
echo "addnode=toguvy5upyuctudx.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
echo "addnode=ndndword5lpb7eex.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
echo "addnode=6m2iqgnqjxh7ulyk.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
echo "addnode=5tuxetn7tar3q5kp.onion" | sudo tee --append /home/bitcoin/.${network}/${network}.conf |
|||
fi |
|||
|
|||
sudo cp /home/bitcoin/.${network}/${network}.conf /home/admin/.${network}/${network}.conf |
|||
sudo chown admin:admin /home/admin/.${network}/${network}.conf |
|||
|
|||
else |
|||
echo "Chain network already configured for TOR" |
|||
fi |
|||
|
|||
echo "*** ${network} re-init - Waiting for Onion Address ***" |
|||
# restarting bitcoind to start with tor and generare onion.address |
|||
echo "restarting ${network}d ..." |
|||
sudo systemctl restart ${network}d |
|||
sleep 8 |
|||
onionAddress="" |
|||
while [ ${#onionAddress} -eq 0 ] |
|||
do |
|||
echo "--- Checking 2 ---" |
|||
date +%s |
|||
testNetAdd="" |
|||
if [ "${chain}" = "test" ];then |
|||
testNetAdd="/testnet3" |
|||
fi |
|||
sudo cat /mnt/hdd/${network}${testNetAdd}/debug.log 2>/dev/null | grep "tor" | tail -n 10 |
|||
onionAddress=$(sudo -u bitcoin ${network}-cli getnetworkinfo | grep '"address"' | cut -d '"' -f4) |
|||
echo "Can take up to 20min - if this takes longer --> CTRL+c, reboot and check manually" |
|||
sleep 5 |
|||
done |
|||
onionPort=$(sudo -u bitcoin ${network}-cli getnetworkinfo | grep '"port"' | tr -dc '0-9') |
|||
echo "Your Chain Network Onion Address is: ${onionAddress}:${onionPort}" |
|||
echo "" |
|||
|
|||
echo "*** Setting your Onion Address ***" |
|||
onionLND=$(sudo cat /mnt/hdd/tor/lnd9735/hostname) |
|||
echo "Your Lightning Tor Onion Address is: ${onionLND}:9735" |
|||
echo "" |
|||
|
|||
# ACTIVATE LND OVER TOR |
|||
echo "*** Putting LND behind TOR ***" |
|||
echo "Disable LND again" |
|||
sudo systemctl disable lnd |
|||
echo "Writing Public Onion Address to /run/publicip (just in case for TotHiddenServiceV3)" |
|||
echo "PUBLICIP=${onionLND}" | sudo tee /run/publicip |
|||
echo "Configure and Changing to lnd.tor.service" |
|||
sed -i "5s/.*/Wants=${network}d.service/" ./assets/lnd.tor.service |
|||
sed -i "6s/.*/After=${network}d.service/" ./assets/lnd.tor.service |
|||
sudo cp /home/admin/assets/lnd.tor.service /etc/systemd/system/lnd.service |
|||
sudo chmod +x /etc/systemd/system/lnd.service |
|||
echo "Enable LND again" |
|||
sudo systemctl enable lnd |
|||
echo "OK" |
|||
echo "" |
|||
|
|||
echo "*** Finshing Setup / REBOOT ***" |
|||
echo "OK - all should be set" |
|||
echo "" |
|||
echo "PRESS ENTER ... to REBOOT" |
|||
read key |
|||
|
|||
sudo shutdown -r now |
|||
exit 0 |
@ -0,0 +1,52 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<rss version="2.0"> |
|||
|
|||
<channel> |
|||
|
|||
<title>RaspiBlitz TorrentSeeds RSS</title> |
|||
<description>Help on seeding the lastest RaspiBlitz Torrent Seeds</description> |
|||
<language>en-en</language> |
|||
|
|||
<!-- Upload new versions to wiki.fulmo.org --> |
|||
<link>http://wiki.fulmo.org/downloads/raspiblitz-torrents-rss.xml</link> |
|||
|
|||
<item> |
|||
<guid>http://github.com/rootzoll/raspiblitz/raw/master/home.admin/assets/raspiblitz-bitcoin1-2018-10-13-base.torrent</guid> |
|||
<title>raspiblitz-bitcoin1-2018-10-13-base.torrent</title> |
|||
<enclosure |
|||
url="http://github.com/rootzoll/raspiblitz/raw/master/home.admin/assets/raspiblitz-bitcoin1-2018-10-13-base.torrent" |
|||
type="application/x-bittorrent" |
|||
/> |
|||
</item> |
|||
|
|||
<item> |
|||
<guid>http://github.com/rootzoll/raspiblitz/raw/master/home.admin/assets/raspiblitz-bitcoin1-2019-01-16-update.torrent</guid> |
|||
<title>raspiblitz-bitcoin1-2019-01-16-update.torrent</title> |
|||
<enclosure |
|||
url="http://github.com/rootzoll/raspiblitz/raw/master/home.admin/assets/raspiblitz-bitcoin1-2019-01-16-update.torrent" |
|||
type="application/x-bittorrent" |
|||
/> |
|||
</item> |
|||
|
|||
<item> |
|||
<guid>http://github.com/rootzoll/raspiblitz/raw/master/home.admin/assets/raspiblitz-litecoin1-2018-11-18-base.torrent</guid> |
|||
<title>raspiblitz-litecoin1-2018-11-18-base.torrent</title> |
|||
<enclosure |
|||
url="http://github.com/rootzoll/raspiblitz/raw/master/home.admin/assets/raspiblitz-litecoin1-2018-11-18-base.torrent" |
|||
type="application/x-bittorrent" |
|||
/> |
|||
</item> |
|||
|
|||
<item> |
|||
<guid>http://github.com/rootzoll/raspiblitz/raw/master/home.admin/assets/raspiblitz-litecoin1-2018-11-18-update.torrent</guid> |
|||
<title>raspiblitz-litecoin1-2018-11-18-update.torrent</title> |
|||
<enclosure |
|||
url="http://github.com/rootzoll/raspiblitz/raw/master/home.admin/assets/raspiblitz-litecoin1-2018-11-18-update.torrent" |
|||
type="application/x-bittorrent" |
|||
/> |
|||
</item> |
|||
|
|||
</channel> |
|||
|
|||
</rss> |
@ -0,0 +1,87 @@ |
|||
#!/bin/bash |
|||
|
|||
# command info |
|||
if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then |
|||
echo "script to run re-index if the blockchain (in case of repair)" |
|||
echo "run to start or monitor re-index progress" |
|||
exit 1 |
|||
fi |
|||
|
|||
# check and load raspiblitz config |
|||
# to know which network is running |
|||
source /mnt/hdd/raspiblitz.conf 2>/dev/null |
|||
if [ ${#network} -eq 0 ]; then |
|||
echo "FAIL - missing /mnt/hdd/raspiblitz.conf" |
|||
exit 1 |
|||
fi |
|||
|
|||
# load raspiblitz.info to know if reindex is already running |
|||
source /home/admin/raspiblitz.info 2>/dev/null |
|||
if [ ${#state} -eq 0 ]; then |
|||
echo "FAIL - missing /home/admin/raspiblitz.info" |
|||
exit 1 |
|||
fi |
|||
|
|||
# if re-index is not running, start ... |
|||
if [ "${state}" != "reindex" ]; then |
|||
|
|||
# stop services |
|||
echo "making sure services are not running .." |
|||
sudo systemctl stop lnd 2>/dev/null |
|||
sudo systemctl stop ${network}d 2>/dev/null |
|||
|
|||
# starting reindex |
|||
echo "starting re-index ..." |
|||
sudo -u bitcoin /usr/local/bin/${network}d -daemon -reindex -conf=/home/bitcoin/.${network}/${network}.conf -datadir=/home/bitcoin/.${network} |
|||
|
|||
# set reindex flag in raspiblitz.info (gets deleted after (final) reboot) |
|||
sudo sed -i "s/^state=.*/state=reindex/g" /home/admin/raspiblitz.info |
|||
|
|||
fi |
|||
|
|||
# while loop to wait to finish |
|||
finished=0 |
|||
while [ ${finished} -eq 0 ] |
|||
do |
|||
clear |
|||
echo "*************************" |
|||
echo "REINDEXING BLOCKCHAIN" |
|||
echo "*************************" |
|||
date |
|||
echo "THIS CAN TAKE SOME LONG TIME" |
|||
echo "If you dont see any progress after 24h keep X pressed to stop." |
|||
|
|||
progress=0 |
|||
echo "" |
|||
echo "PROGRESS: ${progress}%" |
|||
echo "" |
|||
|
|||
#TODO: detect and display progress |
|||
#TODO: determine when finished and then finished=1 |
|||
|
|||
echo "You can close terminal while reindex is running.." |
|||
echo "But you have to login again to check if ready." |
|||
|
|||
# wait 2 seconds for key input |
|||
read -n 1 -t 2 keyPressed |
|||
|
|||
# check if user wants to abort monitor |
|||
if [ "${keyPressed}" = "x" ]; then |
|||
echo "stopped by user ..." |
|||
break |
|||
fi |
|||
|
|||
done |
|||
|
|||
# trigger reboot when finished |
|||
echo "*************************" |
|||
echo "Re-Index finished" |
|||
echo "Starting reboot ..." |
|||
echo "*************************" |
|||
# stop bitcoind |
|||
sudo -u bitcoin ${network}-cli stop |
|||
sleep 4 |
|||
# clean logs (to prevent a false reindex detection) |
|||
sudo rm /mnt/hdd/${network}/debug.log |
|||
# reboot |
|||
sudo shutdown -r now |
@ -1,71 +0,0 @@ |
|||
# The ODroid HC1 on DietPi is made to be a lightning node ⚡️ |
|||
|
|||
![](DietPi/DroidBlitz.jpg) |
|||
|
|||
## Setting up the DietPi OS |
|||
|
|||
Download this image: |
|||
https://dietpi.com/downloads/images/DietPi_OdroidXU4-ARMv7-Stretch.7z |
|||
and burn it to the SD with https://www.balena.io/etcher/ |
|||
|
|||
Getting started with DietPi: https://dietpi.com/phpbb/viewtopic.php?f=8&t=9#p9 |
|||
|
|||
|
|||
## On the desktop Linux terminal |
|||
`ssh root@[IP-OF-DIETPI]` |
|||
password: `dietpi` |
|||
|
|||
>Ok > Cancel the recovery point |
|||
Ok > Cancel > Cancel |
|||
automatic apt update & apt upgrade on first logon and reboots |
|||
Opt out of survey > Ok > Ok |
|||
|
|||
`ssh root@[IP-OF-DIETPI]` |
|||
|
|||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|||
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ |
|||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|||
|
|||
run (can be copied from the terminal output): |
|||
`ssh-keygen -f "/home/[your-linux-username]/.ssh/known_hosts" -R "dietpi.IP"` |
|||
|
|||
`ssh root@[IP-OF-DIETPI]` |
|||
yes > |
|||
password: `dietpi` |
|||
>Ok > Cancel > Cancel |
|||
Search `fail2ban` > Space to select > Enter |
|||
Search `openssh` > Space to select OpenSSH Client > Enter |
|||
> Install > Ok |
|||
Opt out of survey > Ok |
|||
Reboots again |
|||
|
|||
Looks like this: |
|||
|
|||
![](DietPi/DietPi-Software.png) |
|||
|
|||
(if it would start the DietPi-Software GUI again > |
|||
Exit with CTRL + C |
|||
`run dietpi-update` |
|||
and reinstall fail2ban and openssh after the reboot) |
|||
|
|||
`ssh root@[IP-OF-DIETPI]` |
|||
Should end up here on version v6.20.5 or higher: |
|||
|
|||
![](DietPi/DietPi_v6.20.5.png) |
|||
|
|||
|
|||
run the SDcard build script in this format: wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh [BRANCH] [GITHUB-USERNAME] |
|||
|
|||
`wget https://raw.githubusercontent.com/openoms/HardwareNode/OdroidHC1Debug/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh OdroidHC1Debug openoms` |
|||
|
|||
See my example output: [sdcard_build_output](DietPi/sdcard_build_output) |
|||
|
|||
`ssh admin@[IP-OF-DROIDBLITZ]` |
|||
password: raspiblitz |
|||
|
|||
The setup continues as described in the RaspiBlitz setup [README.md](README.md#documentation) |
|||
|
|||
## Example of setting up a RaspiBlitz HDD to be copied to the ODroid: |
|||
|
|||
![copy the blockchain from a HDD of a Raspiblitz](DietPi/copy_hdd.png) |
|||
![example setup](DietPi/HDD_copy_example.jpg) |