mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-18 05:41:47 +01:00
Merge branch 'v1.7' into dev
This commit is contained in:
commit
1c59fb73eb
alternative.platforms
build_sdcard.shhome.admin
00infoBlitz.sh00raspiblitz.sh97addMobileWallet.sh98repairMenu.sh99updateMenu.shXXcleanHDD.shXXcopyStation.sh_background.sh_bootstrap.sh_provision_.sh
config.scripts
blitz.backupdevice.shblitz.datadrive.shblitz.display.shblitz.github.shblitz.litecoin.shblitz.migration.shblitz.setconf.shblitz.setpassword.shblitz.shutdown.shblitz.statusscan.shblitz.subscriptions.ip2tor.pyblitz.subscriptions.letsencrypt.pyblitz.subscriptions.pybonus.angular_cli.shbonus.circuitbreaker.shbonus.letsencrypt.shbonus.lndmanage.shbonus.loop.shbonus.mempool.shbonus.pool.shbonus.sphinxrelay.shbonus.stacking-sats-kraken.shbonus.telegraf.shbonus.zerotier.shdropbox.upload.shinternet.dns.shinternet.shinternet.sshpubkey.shinternet.sshtunnel.pyinternet.tor.shinternet.wifi.shlnd.autonat.shlnd.autopilot.shlnd.autounlock.shlnd.check.shlnd.credentials.shlnd.setport.shlnd.update.shnetwork.monitor.shnetwork.upnp.sh
@ -12,7 +12,7 @@ On MacOS you need to install:
|
||||
1. brew: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"`
|
||||
2. packer: `brew install packer`
|
||||
3. vagrant: `brew install vagrant`
|
||||
4. virtualbox: `brew cask install virtualbox` (maybe re-run after you changed the requested secruity permission to be successfull)
|
||||
4. virtualbox: `brew cask install virtualbox` (maybe re-run after you changed the requested security permission to be successful)
|
||||
|
||||
```
|
||||
cd alternative.platforms/amd64/packer
|
||||
|
@ -71,7 +71,7 @@ password: `raspiblitz`
|
||||
|
||||
### Build your own DietPi image:
|
||||
|
||||
Watch out this is an ardous process.
|
||||
Watch out this is an arduous process.
|
||||
Updating from a v6.14 DietPi image is causing a bootloop after the first restart. See the issue: https://github.com/MichaIng/DietPi/issues/2495.
|
||||
This will be sorted out once a new image version is uploaded for the Odroids to dietpi.com
|
||||
|
||||
@ -135,7 +135,7 @@ Changing the SSH server will change the SSH keys again. To clear:
|
||||
|
||||
* Run this command to build from the master branch of @rootzoll:
|
||||
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh`
|
||||
This will take a couple minutes depending on your internet ceonnection and the processing power of the SBC.
|
||||
This will take a couple minutes depending on your internet connection and the processing power of the SBC.
|
||||
|
||||
* Format of the command to build the SDcard from an alternative branch:
|
||||
`wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh [BRANCH] [GITHUB-USERNAME]`
|
||||
|
@ -14,7 +14,7 @@ echo "* RASPIBLITZ SD CARD IMAGE SETUP v1.7.1 *"
|
||||
echo "*****************************************"
|
||||
echo "For details on optional parameters - see build script source code:"
|
||||
|
||||
# 1st optional paramater: NO-INTERACTION
|
||||
# 1st optional parameter: NO-INTERACTION
|
||||
# ----------------------------------------
|
||||
# When 'true' then no questions will be asked on building .. so it can be used in build scripts
|
||||
# for containers or as part of other build scripts (default is false)
|
||||
@ -30,7 +30,7 @@ else
|
||||
echo "1) will use NO-INTERACTION --> '${noInteraction}'"
|
||||
fi
|
||||
|
||||
# 2nd optional paramater: FATPACK
|
||||
# 2nd optional parameter: FATPACK
|
||||
# -------------------------------
|
||||
# could be 'true' or 'false' (default)
|
||||
# When 'true' it will pre-install needed frameworks for additional apps and features
|
||||
@ -50,7 +50,7 @@ else
|
||||
echo "2) will use FATPACK --> '${fatpack}'"
|
||||
fi
|
||||
|
||||
# 3rd optional paramater: GITHUB-USERNAME
|
||||
# 3rd optional parameter: GITHUB-USERNAME
|
||||
# ---------------------------------------
|
||||
# could be any valid github-user that has a fork of the raspiblitz repo - 'rootzoll' is default
|
||||
# The 'raspiblitz' repo of this user is used to provisioning sd card
|
||||
@ -62,7 +62,7 @@ if [ ${#githubUser} -eq 0 ]; then
|
||||
fi
|
||||
echo "3) will use GITHUB-USERNAME --> '${githubUser}'"
|
||||
|
||||
# 4th optional paramater: GITHUB-BRANCH
|
||||
# 4th optional parameter: GITHUB-BRANCH
|
||||
# -------------------------------------
|
||||
# could be any valid branch of the given GITHUB-USERNAME forked raspiblitz repo - 'dev' is default
|
||||
githubBranch="$4"
|
||||
@ -71,7 +71,7 @@ if [ ${#githubBranch} -eq 0 ]; then
|
||||
fi
|
||||
echo "4) will use GITHUB-BRANCH --> '${githubBranch}'"
|
||||
|
||||
# 5th optional paramater: DISPLAY-CLASS
|
||||
# 5th optional parameter: DISPLAY-CLASS
|
||||
# ----------------------------------------
|
||||
# Could be 'hdmi', 'headless' or 'lcd'
|
||||
# On 'false' the standard video output is used (HDMI) by default.
|
||||
@ -87,7 +87,7 @@ else
|
||||
echo "5) will use DISPLAY-CLASS --> '${displayClass}'"
|
||||
fi
|
||||
|
||||
# 6th optional paramater: TWEAK-BOOTDRIVE
|
||||
# 6th optional parameter: TWEAK-BOOTDRIVE
|
||||
# ---------------------------------------
|
||||
# could be 'true' (default) or 'false'
|
||||
# If 'true' it will try (based on the base OS) to optimize the boot drive.
|
||||
@ -103,7 +103,7 @@ else
|
||||
echo "6) will use TWEAK-BOOTDRIVE --> '${tweakBootdrives}'"
|
||||
fi
|
||||
|
||||
# 7th optional paramater: WIFI
|
||||
# 7th optional parameter: WIFI
|
||||
# ---------------------------------------
|
||||
# could be 'false' or 'true' (default) or a valid WIFI country code like 'US' (default)
|
||||
# If 'false' WIFI will be deactivated by default
|
||||
@ -245,7 +245,7 @@ if [ "${baseimage}" = "raspbian" ] || [ "${baseimage}" = "dietpi" ] || \
|
||||
# https://github.com/rootzoll/raspiblitz/issues/684
|
||||
sudo sed -i "s/^ SendEnv LANG LC.*/# SendEnv LANG LC_*/g" /etc/ssh/ssh_config
|
||||
|
||||
# remove unneccesary files
|
||||
# remove unnecessary files
|
||||
sudo rm -rf /home/pi/MagPi
|
||||
# https://www.reddit.com/r/linux/comments/lbu0t1/microsoft_repo_installed_on_all_raspberry_pis/
|
||||
sudo rm -f /etc/apt/sources.list.d/vscode.list
|
||||
|
@ -481,7 +481,7 @@ elif [ ${#ups} -gt 1 ] && [ "${upsStatus}" = "n/a" ]; then
|
||||
echo "UPS service activated but not running"
|
||||
else
|
||||
|
||||
# cheching status of apps and display if in sync or problems
|
||||
# checking status of apps and display if in sync or problems
|
||||
appInfoLine=""
|
||||
|
||||
# Electrum Server - electrs
|
||||
@ -510,4 +510,4 @@ else
|
||||
|
||||
fi
|
||||
|
||||
# EOF
|
||||
# EOF
|
||||
|
@ -62,7 +62,7 @@ fi
|
||||
|
||||
# special state: copystation
|
||||
if [ "${state}" = "copystation" ]; then
|
||||
echo "Copy Station is Runnning ..."
|
||||
echo "Copy Station is Running ..."
|
||||
echo "reboot to return to normal"
|
||||
sudo /home/admin/XXcopyStation.sh
|
||||
exit
|
||||
|
@ -73,7 +73,7 @@ For full support switch to mainnet.
|
||||
" 9 55
|
||||
fi
|
||||
|
||||
# fuction to call for wallets that support TOR
|
||||
# function to call for wallets that support TOR
|
||||
connect="ip"
|
||||
choose_IP_or_TOR()
|
||||
{
|
||||
@ -90,7 +90,7 @@ choose_IP_or_TOR()
|
||||
fi
|
||||
}
|
||||
|
||||
# fuction to if already activated or user wants to activate IP2TOR
|
||||
# function to if already activated or user wants to activate IP2TOR
|
||||
# needs parameter: #1 "LND-REST-API" or "LND-GRPC-API"
|
||||
ip2tor=""
|
||||
checkIP2TOR()
|
||||
@ -109,7 +109,7 @@ checkIP2TOR()
|
||||
#read key
|
||||
|
||||
# if IP2TOR is not already available:
|
||||
# and the checks from avove showed there is SSH forwarding / dynDNS
|
||||
# and the checks from above showed there is SSH forwarding / dynDNS
|
||||
# then ask user if IP2TOR subscription is wanted
|
||||
if [ ${#ip2tor} -eq 0 ] && [ ${aks4IP2TOR} -eq 1 ]; then
|
||||
whiptail --title " Want to use a IP2TOR Bridge? " --yes-button "Go To Shop" --no-button "No Thanks" --yesno "It can be hard to connect to your RaspiBlitz when away from home.\n\nDo you like to subscribe to a IP2TOR bridge service (that will give you a public IP while hidden behind TOR) and make it more easy to connect your mobile wallet?" 12 60
|
||||
|
@ -55,7 +55,7 @@ OPTIONS=(SOFTWARE "Run Softwaretest (DebugReport)" \
|
||||
RESET-CHAIN "Delete Blockchain & Re-Download" \
|
||||
RESET-LND "Delete LND & start new node/wallet" \
|
||||
RESET-HDD "Delete HDD Data but keep Blockchain" \
|
||||
RESET-ALL "Delete HDD completly to start fresh" \
|
||||
RESET-ALL "Delete HDD completely to start fresh" \
|
||||
DELETE-ELEC "Delete Electrum Index" \
|
||||
DELETE-INDEX "Delete Bitcoin Transaction-Index"
|
||||
)
|
||||
|
@ -69,7 +69,7 @@ Do you want to download Lightning Data Backup now?
|
||||
fi
|
||||
|
||||
whiptail --title "READY TO UPDATE?" --yes-button "START UPDATE" --no-button "Cancel" --yesno "If you start the update: The RaspiBlitz will power down.
|
||||
Once the LCD is white and no LEDs are blicking anymore:
|
||||
Once the LCD is white and no LEDs are blinking anymore:
|
||||
|
||||
- Remove the Power from RaspiBlitz
|
||||
- Exchange the old with the new SD card
|
||||
|
@ -100,7 +100,7 @@ else
|
||||
sudo rm -f /mnt/hdd/litecoin/.* 2>/dev/null
|
||||
sudo rm -f -r /mnt/hdd/litecoin/database
|
||||
|
||||
# lnd (delet all)
|
||||
# lnd (delete all)
|
||||
sudo rm -f -r /mnt/hdd/lnd
|
||||
sudo rm -f -r /mnt/hdd/backup_lnd
|
||||
|
||||
|
@ -71,7 +71,7 @@ fi
|
||||
if [ "$1" != "-foreground" ]; then
|
||||
screenPID=$(screen -ls | grep "copystation" | cut -d "." -f1 | xargs)
|
||||
if [ ${#screenPID} -eq 0 ]; then
|
||||
# start copystation in sreen
|
||||
# start copystation in screen
|
||||
echo "# starting copystation screen session"
|
||||
screen -S copystation -dm /home/admin/XXcopyStation.sh -foreground
|
||||
screen -d -r
|
||||
@ -100,7 +100,7 @@ else
|
||||
chmod 777 ${pathTemplateHDD}
|
||||
fi
|
||||
|
||||
# make sure that lnd is stopped (if runnning)
|
||||
# make sure that lnd is stopped (if running)
|
||||
systemctl stop lnd 2>/dev/null
|
||||
systemctl stop background 2>/dev/null
|
||||
|
||||
@ -243,7 +243,7 @@ Please remove device and PRESS ENTER
|
||||
if [ "${nointeraction}" != "1" ]; then
|
||||
whiptail --title "Format HDD" --yes-button "Format" --no-button "Cancel" --yesno "
|
||||
Found new HDD. Do you want to FORMAT now?
|
||||
Lable of device with: ${detectedDrive}
|
||||
Label of device with: ${detectedDrive}
|
||||
" 10 54
|
||||
choice=$?
|
||||
else
|
||||
@ -254,7 +254,7 @@ Lable of device with: ${detectedDrive}
|
||||
# on cancel
|
||||
if [ "${choice}" != "0" ]; then
|
||||
whiptail --title "Format HDD" --msgbox "
|
||||
OK NO FORMAT - Please remove decive now.
|
||||
OK NO FORMAT - Please remove device now.
|
||||
" 8 46
|
||||
exit 1
|
||||
fi
|
||||
|
@ -201,7 +201,7 @@ do
|
||||
echo "new publicIP but no LND restart because no auto-unlock"
|
||||
fi
|
||||
|
||||
# trigger update if dnyamic domain (if set)
|
||||
# trigger update if dynamic domain (if set)
|
||||
updateDynDomain=1
|
||||
|
||||
else
|
||||
@ -300,10 +300,10 @@ do
|
||||
sudo cp ${localBackupPath} /mnt/backup/
|
||||
sudo cp ${localTimestampedPath} /mnt/backup/
|
||||
|
||||
# check reseults
|
||||
# check results
|
||||
result=$?
|
||||
if [ ${result} -eq 0 ]; then
|
||||
echo "OK - Sucessfull Copy to additional Backup Device"
|
||||
echo "OK - Successful Copy to additional Backup Device"
|
||||
else
|
||||
echo "FAIL - Copy to additional Backup Device exited with ${result}"
|
||||
fi
|
||||
|
@ -246,7 +246,7 @@ if [ ${logsMegaByte} -gt 1000 ]; then
|
||||
fi
|
||||
sleep 3
|
||||
echo "WARN !! Logs in /var/log in were bigger then 1GB and got emergency delete to prevent fillup."
|
||||
echo "If you see this in the logs please report to the GitHub issues, so LOG config needs to hbe optimized."
|
||||
echo "If you see this in the logs please report to the GitHub issues, so LOG config needs to be optimized."
|
||||
else
|
||||
echo "OK - logs are at ${logsMegaByte} MB - within safety limit"
|
||||
fi
|
||||
@ -738,7 +738,7 @@ if [ ${#network} -gt 0 ] && [ ${#chain} -gt 0 ]; then
|
||||
sudo /home/admin/config.scripts/lnd.credentials.sh sync >> $logFile
|
||||
|
||||
else
|
||||
echo "skipping LND credientials sync" >> $logFile
|
||||
echo "skipping LND credentials sync" >> $logFile
|
||||
fi
|
||||
|
||||
################################
|
||||
@ -782,7 +782,7 @@ fi
|
||||
# PREPARE SUBSCRIPTIONS DATA DIRECTORY
|
||||
######################################
|
||||
|
||||
if [ -d "/mnt/hdd/app-data/subscrptions" ]; then
|
||||
if [ -d "/mnt/hdd/app-data/subscriptions" ]; then
|
||||
echo "OK: subscription data directory exists"
|
||||
else
|
||||
echo "CREATE: subscription data directory"
|
||||
|
@ -69,7 +69,7 @@ if [ "${headless}" == "on" ]; then
|
||||
echo "displayClass=headless" >> ${configFile}
|
||||
displayClass="headless"
|
||||
elif [ "${headless}" != "" ]; then
|
||||
echo "Remove old headless pramater from config" >> ${logFile}
|
||||
echo "Remove old headless parameter from config" >> ${logFile}
|
||||
sudo sed -i "s/^headless=.*//g" ${configFile}
|
||||
displayClass="lcd"
|
||||
fi
|
||||
@ -148,7 +148,7 @@ sudo rm -r /mnt/hdd/backup_lnd 2>/dev/null
|
||||
sudo cp -r /mnt/hdd/lnd /mnt/hdd/backup_lnd >> ${logFile} 2>&1
|
||||
numOfDiffers=$(sudo diff -arq /mnt/hdd/lnd /mnt/hdd/backup_lnd | grep -c "differ")
|
||||
if [ ${numOfDiffers} -gt 0 ]; then
|
||||
echo "FAIL: Backup was not successfull" >> ${logFile}
|
||||
echo "FAIL: Backup was not successful" >> ${logFile}
|
||||
sudo diff -arq /mnt/hdd/lnd /mnt/hdd/backup_lnd >> ${logFile} 2>&1
|
||||
echo "removing backup dir to prevent false override" >> ${logFile}
|
||||
else
|
||||
@ -249,7 +249,7 @@ if [ ${#bitcoinInterimsUpdate} -gt 0 ]; then
|
||||
sudo sed -i "s/^message=.*/message='Provisioning Bitcoin Core update'/g" ${infoFile}
|
||||
if [ "${bitcoinInterimsUpdate}" == "reckless" ]; then
|
||||
# recklessly update Bitcoin Core to latest release on GitHub
|
||||
echo "Provisioning BItcoin Core reckless interims update" >> ${logFile}
|
||||
echo "Provisioning Bitcoin Core reckless interims update" >> ${logFile}
|
||||
sudo /home/admin/config.scripts/bitcoin.update.sh reckless >> ${logFile}
|
||||
else
|
||||
# when installing the same sd image - this will re-trigger the secure interims update
|
||||
@ -673,7 +673,7 @@ if [ ${confExists} -eq 0 ]; then
|
||||
sudo chown bitcoin:bitcoin /mnt/hdd/bitcoin/bitcoin.conf
|
||||
fi
|
||||
|
||||
# singal setup done
|
||||
# signal setup done
|
||||
sudo sed -i "s/^message=.*/message='Setup Done'/g" ${infoFile}
|
||||
|
||||
# set the local network hostname (just if set in config - will not be set anymore by default in newer version)
|
||||
|
@ -24,7 +24,7 @@ if [ "$1" = "status" ]; then
|
||||
echo "backupdevice=1"
|
||||
echo "UUID='${localBackupDeviceUUID}'"
|
||||
|
||||
# check if nackup device is mounted
|
||||
# check if backup device is mounted
|
||||
backupDeviceExists=$(df | grep -c "/mnt/backup")
|
||||
if [ ${backupDeviceExists} -gt 0 ]; then
|
||||
echo "isMounted=1"
|
||||
@ -43,7 +43,7 @@ if [ "$1" = "status" ]; then
|
||||
for disk in $(lsblk -o NAME,TYPE | grep "disk" | awk '$1=$1' | cut -d " " -f 1)
|
||||
do
|
||||
devMounted=$(lsblk -o MOUNTPOINT,NAME | grep "$disk" | grep -c "^/")
|
||||
# is raid candidate when: not mounted & not the data drive cadidate (hdd/ssd) & not BTRFS RAID
|
||||
# is raid candidate when: not mounted & not the data drive candidate (hdd/ssd) & not BTRFS RAID
|
||||
if [ ${devMounted} -eq 0 ] && [ "${disk}" != "${hdd}" ] && [ "${disk}" != "${raidUsbDev}" ]; then
|
||||
sizeBytes=$(lsblk -o NAME,SIZE -b | grep "^${disk}" | awk '$1=$1' | cut -d " " -f 2)
|
||||
sizeGigaBytes=$(echo "scale=0; ${sizeBytes}/1024/1024/1024" | bc -l)
|
||||
@ -86,7 +86,7 @@ if [ "$1" = "on" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if backup devcie is already connected
|
||||
# check if backup device is already connected
|
||||
if [ ${backupCandidates} -eq 0 ]; then
|
||||
dialog --title ' Adding Backup Device ' --msgbox 'Please connect now the backup device\nFor example a thumb drive bigger than 120 MB.\nDont use a second HDD/SSD for that.\nBest on a USB2 port (not the blue ones).\nThen press OK.' 9 50
|
||||
clear
|
||||
@ -95,7 +95,7 @@ if [ "$1" = "on" ]; then
|
||||
sleep 3
|
||||
source <(sudo /home/admin/config.scripts/blitz.backupdevice.sh status)
|
||||
if [ ${backupCandidates} -eq 0 ]; then
|
||||
dialog --title ' FAIL ' --msgbox 'NOT able to detect a possible backup device.\nProcess was not sucessful.' 6 50
|
||||
dialog --title ' FAIL ' --msgbox 'NOT able to detect a possible backup device.\nProcess was not successful.' 6 50
|
||||
clear
|
||||
exit 1
|
||||
fi
|
||||
@ -246,5 +246,5 @@ if [ "$1" = "off" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "error='unkown command'"
|
||||
echo "error='unknown command'"
|
||||
exit 1
|
@ -12,9 +12,9 @@ fi
|
||||
|
||||
# TO UNDERSTAND THE BTFS HDD LAYOUT:
|
||||
####################################
|
||||
# 1) BLITZDATA - a BTRFS partion for all RaspiBlitz data - 30GB
|
||||
# 1) BLITZDATA - a BTRFS partition for all RaspiBlitz data - 30GB
|
||||
# here put all files of LND, app, etc that need backup
|
||||
# 2) BLITZSTORE - a BTFRS partion for mostly Blockchain data
|
||||
# 2) BLITZSTORAGE - a BTFRS partition for mostly Blockchain data
|
||||
# all data here can get lost and rebuild if needed (Blockchain, Indexes, etc)
|
||||
# 3) BLITZTEMP - a FAT partition just for SWAP & Exchange - 34GB
|
||||
# used for SWAP file and easy to read from Win32/MacOS for exchange
|
||||
@ -124,14 +124,14 @@ if [ "$1" = "status" ]; then
|
||||
fi
|
||||
else
|
||||
|
||||
# default hdd set, when there is no OSpartition and there might ne no partitions at all
|
||||
# default hdd set, when there is no OSpartition and there might be no partitions at all
|
||||
if [ "${OSPartition}" = "root" ] && [ "${hdd}" = "" ] && [ "${testdevice}" != "" ]; then
|
||||
hdd="${testdevice}"
|
||||
fi
|
||||
|
||||
# make sure to use the biggest
|
||||
if [ ${testsize} -gt ${sizeDataPartition} ]; then
|
||||
# Partion to be created is smaller than disk so this is not correct (but close)
|
||||
# Partition to be created is smaller than disk so this is not correct (but close)
|
||||
sizeDataPartition=$(sudo fdisk -l /dev/$testdevice | grep GiB | cut -d " " -f 5)
|
||||
hddDataPartition="${testdevice}1"
|
||||
hdd="${testdevice}"
|
||||
@ -418,7 +418,7 @@ if [ "$1" = "status" ]; then
|
||||
for disk in $(lsblk -o NAME,TYPE | grep "disk" | awk '$1=$1' | cut -d " " -f 1)
|
||||
do
|
||||
devMounted=$(lsblk -o MOUNTPOINT,NAME | grep "$disk" | grep -c "^/")
|
||||
# is raid candidate when not mounted and not the data drive cadidate (hdd/ssd)
|
||||
# is raid candidate when not mounted and not the data drive candidate (hdd/ssd)
|
||||
if [ ${devMounted} -eq 0 ] && [ "${disk}" != "${hdd}" ] && [ "${hdd}" != "" ]; then
|
||||
sizeBytes=$(lsblk -o NAME,SIZE -b | grep "^${disk}" | awk '$1=$1' | cut -d " " -f 2)
|
||||
sizeGigaBytes=$(echo "scale=0; ${sizeBytes}/1024/1024/1024" | bc -l)
|
||||
@ -447,7 +447,7 @@ fi
|
||||
# FORMAT EXT4 or BTRFS
|
||||
######################
|
||||
|
||||
# check basics for formating
|
||||
# check basics for formatting
|
||||
if [ "$1" = "format" ]; then
|
||||
|
||||
# check valid format
|
||||
@ -465,7 +465,7 @@ if [ "$1" = "format" ]; then
|
||||
hdd=$3
|
||||
if [ ${#hdd} -eq 0 ]; then
|
||||
>&2 echo "# missing valid third parameter as the device (like 'sda')"
|
||||
>&2 echo "# run 'status' to see cadidate devices"
|
||||
>&2 echo "# run 'status' to see candidate devices"
|
||||
echo "error='missing parameter'"
|
||||
exit 1
|
||||
fi
|
||||
@ -631,7 +631,7 @@ if [ "$1" = "format" ]; then
|
||||
fi
|
||||
done
|
||||
|
||||
# setting fsk check intervall to 1
|
||||
# setting fsk check interval to 1
|
||||
# see https://github.com/rootzoll/raspiblitz/issues/360#issuecomment-467567572
|
||||
if [ $ext4IsPartition -eq 0 ]; then
|
||||
sudo tune2fs -c 1 /dev/${hdd}1
|
||||
@ -643,7 +643,7 @@ if [ "$1" = "format" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# formatting new: BTRFS layout - this consists of 3 volmunes:
|
||||
# formatting new: BTRFS layout - this consists of 3 volumes:
|
||||
if [ "$2" = "btrfs" ]; then
|
||||
|
||||
# prepare temp mount point
|
||||
@ -729,7 +729,7 @@ if [ "$1" = "format" ]; then
|
||||
sudo btrfs subvolume create WORKINGDIR
|
||||
cd && sudo umount /tmp/btrfs
|
||||
|
||||
>&2 echo "# Creating the FAT32 partion"
|
||||
>&2 echo "# Creating the FAT32 partition"
|
||||
sudo parted -s -a optimal -- /dev/${hdd} mkpart primary fat32 -34GiB 100% 1>/dev/null
|
||||
sync && sleep 3
|
||||
win=$(lsblk -o NAME | grep -c ${hdd}3)
|
||||
@ -911,7 +911,7 @@ if [ "$1" = "fstab" ]; then
|
||||
sync
|
||||
done
|
||||
|
||||
# get user and grouid if usr/group bitcoin
|
||||
# get user and groupid if usr/group bitcoin
|
||||
bitcoinUID=$(id -u bitcoin)
|
||||
bitcoinGID=$(id -g bitcoin)
|
||||
|
||||
@ -981,7 +981,7 @@ if [ "$1" = "raid" ]; then
|
||||
>&2 echo "# RAID - Removing raid drive to RaspiBlitz data drive"
|
||||
else
|
||||
>&2 echo "# possible 2nd parameter is 'on' or 'off'"
|
||||
echo "error='unkown parameter'"
|
||||
echo "error='unknown parameter'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -995,7 +995,7 @@ if [ "$1" = "raid" ] && [ "$2" = "on" ]; then
|
||||
# second parameter - like its named: lsblk
|
||||
usbdev=$3
|
||||
if [ ${#usbdev} -eq 0 ]; then
|
||||
>&2 echo "# FAIL third parameter is missing with the name of the usb device to add"
|
||||
>&2 echo "# FAIL third parameter is missing with the name of the USB device to add"
|
||||
echo "error='missing parameter'"
|
||||
exit 1
|
||||
fi
|
||||
@ -1037,7 +1037,7 @@ if [ "$1" = "raid" ] && [ "$2" = "on" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove all partions from device
|
||||
# remove all partitions from device
|
||||
for v_partition in $(parted -s /dev/${usbdev} print|awk '/^ / {print $1}')
|
||||
do
|
||||
sudo parted -s /dev/${usbdev} rm ${v_partition}
|
||||
@ -1267,7 +1267,7 @@ if [ "$1" = "tempmount" ]; then
|
||||
|
||||
elif [ "${hddFormat}" = "btrfs" ]; then
|
||||
|
||||
# get user and grouid if usr/group bitcoin
|
||||
# get user and groupid if usr/group bitcoin
|
||||
bitcoinUID=$(id -u bitcoin)
|
||||
bitcoinGID=$(id -g bitcoin)
|
||||
|
||||
@ -1430,7 +1430,7 @@ if [ "$1" = "link" ]; then
|
||||
echo "The /mnt/hdd/app-data directory should be used by additional/optional apps and services installed to the RaspiBlitz for their data that should survive an import/export/backup. Data that can be reproduced (indexes, etc.) should be stored in app-storage." > ./README.txt
|
||||
sudo mv ./README.txt /mnt/hdd/app-data/README.txt 2>/dev/null
|
||||
|
||||
echo "The /mnt/hdd/app-storage directrory should be used by additional/optional apps and services installed to the RaspiBlitz for their non-critical and reproducable data (indexes, public blockchain, etc.) that does not need to survive an an import/export/backup. Data is critical should be in app-data." > ./README.txt
|
||||
echo "The /mnt/hdd/app-storage directory should be used by additional/optional apps and services installed to the RaspiBlitz for their non-critical and reproducible data (indexes, public blockchain, etc.) that does not need to survive an an import/export/backup. Data is critical should be in app-data." > ./README.txt
|
||||
sudo mv ./README.txt /mnt/hdd/app-storage/README.txt 2>/dev/null
|
||||
|
||||
>&2 echo "# OK - all symbolic links build"
|
||||
@ -1514,8 +1514,8 @@ if [ "$1" = "swap" ]; then
|
||||
exit 0
|
||||
|
||||
else
|
||||
>&2 echo "# FAIL unkown second parameter - try 'on' or 'off'"
|
||||
echo "error='unkown parameter'"
|
||||
>&2 echo "# FAIL unknown second parameter - try 'on' or 'off'"
|
||||
echo "error='unknown parameter'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -1560,7 +1560,7 @@ if [ "$1" = "clean" ]; then
|
||||
sudo dphys-swapfile uninstall 1>/dev/null
|
||||
sync
|
||||
|
||||
# for all other data shred files selectivly
|
||||
# for all other data shred files selectively
|
||||
for entry in $(ls -A1 /mnt/hdd)
|
||||
do
|
||||
|
||||
@ -1574,7 +1574,7 @@ if [ "$1" = "clean" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# decide when to shredd or just delete - just delete unsensitive data
|
||||
# decide when to shred or just delete - just delete nonsensitive data
|
||||
if [ "${entry}" = "torrent" ] || [ "${entry}" = "app-storage" ]; then
|
||||
whenDeleteSchredd=0
|
||||
fi
|
||||
@ -1585,7 +1585,7 @@ if [ "$1" = "clean" ]; then
|
||||
if [ ${isBTRFS} -eq 1 ] && [ "${entry}" != "temp" ]; then
|
||||
whenDeleteSchredd=0
|
||||
fi
|
||||
# on SSDs never shredd
|
||||
# on SSDs never shred
|
||||
# https://www.davescomputers.com/securely-deleting-files-solid-state-drive/
|
||||
if [ "${isSSD}" == "1" ]; then
|
||||
whenDeleteSchredd=0
|
||||
@ -1681,8 +1681,8 @@ if [ "$1" = "clean" ]; then
|
||||
exit 1
|
||||
|
||||
else
|
||||
>&2 echo "# FAIL unkown third parameter try '-total' or '-keepblockchain'"
|
||||
echo "error='unkown parameter'"
|
||||
>&2 echo "# FAIL unknown third parameter try '-total' or '-keepblockchain'"
|
||||
echo "error='unknown parameter'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -1740,8 +1740,8 @@ if [ "$1" = "clean" ]; then
|
||||
exit 1
|
||||
|
||||
else
|
||||
>&2 echo "# FAIL unkown second parameter - try 'all','blockchain' or 'temp'"
|
||||
echo "error='unkown parameter'"
|
||||
>&2 echo "# FAIL unknown second parameter - try 'all','blockchain' or 'temp'"
|
||||
echo "error='unknown parameter'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -211,7 +211,7 @@ if [ "${command}" == "hdmi" ]; then
|
||||
elif [ "${secondParameter}" == "off" ]; then
|
||||
sudo /home/admin/config.scripts/blitz.display.sh set-display lcd
|
||||
else
|
||||
echo "error='unkown second parameter'"
|
||||
echo "error='unknown second parameter'"
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
@ -220,7 +220,7 @@ fi
|
||||
#######################################
|
||||
# DISPLAY TYPED INSTALLS & UN-INSTALLS
|
||||
# HDMI is the default - every added
|
||||
# displayClass needs a install fuction
|
||||
# displayClass needs a install function
|
||||
# and a uninstall function back to HDMI
|
||||
#######################################
|
||||
|
||||
@ -290,7 +290,7 @@ function install_lcd() {
|
||||
fi
|
||||
containsModification=$(sudo grep -c "${modification}" /boot/cmdline.txt)
|
||||
if [ ${containsModification} -eq 0 ]; then
|
||||
echo "# FAIL: was not able to mofify /boot/cmdline.txt"
|
||||
echo "# FAIL: was not able to modify /boot/cmdline.txt"
|
||||
echo "err='ended unclear state'"
|
||||
exit 1
|
||||
fi
|
||||
@ -566,5 +566,5 @@ if [ "${command}" == "set-display" ]; then
|
||||
fi
|
||||
|
||||
# unknown command
|
||||
echo "error='unkown command'"
|
||||
echo "error='unknown command'"
|
||||
exit 1
|
@ -36,13 +36,13 @@ install=0
|
||||
wantedBranch="$1"
|
||||
wantedGitHubUser="$2"
|
||||
if [ "${wantedBranch}" = "-run" ]; then
|
||||
# "-run" ist just used by "patch" command and will ignore all further parameter
|
||||
# "-run" its just used by "patch" command and will ignore all further parameter
|
||||
wantedBranch="${activeBranch}"
|
||||
wantedGitHubUser="${activeGitHubUser}"
|
||||
# detect if running in vagrant VM
|
||||
vagrant=$(df | grep -c "/vagrant")
|
||||
if [ "$2" = "git" ]; then
|
||||
echo "# forcing guthub over vagrant sync"
|
||||
echo "# forcing github over vagrant sync"
|
||||
vagrant=0
|
||||
fi
|
||||
fi
|
||||
|
@ -12,7 +12,7 @@ fi
|
||||
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian')
|
||||
if [ ${isRaspbian} -eq 0]; then
|
||||
|
||||
echo "error='litecoin is only avaulable for raspbian realease'"
|
||||
echo "error='litecoin is only available for raspbian release'"
|
||||
exit 1
|
||||
|
||||
else
|
||||
|
@ -336,7 +336,7 @@ if [ "$1" = "export-gui" ]; then
|
||||
echo "* DOWNLOAD THE MIGRATION FILE *"
|
||||
echo "*******************************"
|
||||
echo
|
||||
echo "On yoz Linux or MacOS Laptop - RUN IN NEW TERMINAL:"
|
||||
echo "On your Linux or MacOS Laptop - RUN IN NEW TERMINAL:"
|
||||
echo "${scpDownloadUnix}"
|
||||
echo "On Windows use command:"
|
||||
echo "${scpDownloadWin}"
|
||||
@ -387,7 +387,7 @@ if [ "$1" = "import" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# copy bitcoin/litecoin data backups back to orgplaces (if part of backup)
|
||||
# copy bitcoin/litecoin data backups back to original places (if part of backup)
|
||||
if [ -d "/mnt/hdd/backup_bitcoin" ]; then
|
||||
echo "# Copying back bitcoin backup data .."
|
||||
sudo mkdir /mnt/hdd/bitcoin
|
||||
@ -419,4 +419,4 @@ if [ "$1" = "import" ]; then
|
||||
fi
|
||||
|
||||
echo "error='unkown command'"
|
||||
exit 1
|
||||
exit 1
|
||||
|
@ -21,7 +21,7 @@ dialog \
|
||||
--title "Editing the $EDITFILE" \
|
||||
--editbox "$EDITFILE" 200 200 2> "$conf"
|
||||
|
||||
# make decison
|
||||
# make decision
|
||||
pressed=$?
|
||||
case $pressed in
|
||||
0)
|
||||
|
@ -130,7 +130,7 @@ if [ "${abcd}" = "a" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# use entred password now as parameter
|
||||
# use entered password now as parameter
|
||||
newPassword="${password1}"
|
||||
|
||||
fi
|
||||
@ -206,7 +206,7 @@ elif [ "${abcd}" = "b" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# use entred password now as parameter
|
||||
# use entered password now as parameter
|
||||
newPassword="${password1}"
|
||||
fi
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# for reboot call: sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
|
||||
# use this script instead of dirct shutdown command to:
|
||||
# use this script instead of direct shutdown command to:
|
||||
# 1) give UI the info that a reboot/shutdown is now happening
|
||||
# 2) shutdown/reboot in a safe way to prevent data corruption
|
||||
|
||||
|
@ -202,7 +202,7 @@ if [ ${lndRunning} -eq 1 ]; then
|
||||
# nullify error - this is normal
|
||||
lndErrorFull=""
|
||||
errorResolved=1
|
||||
# oputput basic data because no error
|
||||
# output basic data because no error
|
||||
echo "# LND RPC is still warming up - no scan progress: prepare scan"
|
||||
echo "scanTimestamp=-2"
|
||||
echo "syncedToChain=0"
|
||||
@ -215,7 +215,7 @@ if [ ${lndRunning} -eq 1 ]; then
|
||||
|
||||
# if not known error and not resolved before - keep generic
|
||||
if [ ${#lndErrorShort} -eq 0 ] && [ ${errorResolved} -eq 0 ]; then
|
||||
lndErrorShort='Unkown Error - see logs'
|
||||
lndErrorShort='Unknown Error - see logs'
|
||||
lndErrorFull=$(echo ${lndErrorFull} | tr -d "'")
|
||||
fi
|
||||
|
||||
@ -257,7 +257,7 @@ if [ ${lndRunning} -eq 1 ]; then
|
||||
scanDate=$(date -d @${scanTimestamp} 2>/dev/null)
|
||||
echo "scanDate='${scanDate}'"
|
||||
|
||||
# calculate LND scan progress by seconds since Genesisblock
|
||||
# calculate LND scan progress by seconds since Genesis block
|
||||
genesisTimestamp=1230940800
|
||||
|
||||
totalSeconds=$(echo "${nowTimestamp}-${genesisTimestamp}" | bc)
|
||||
|
@ -365,7 +365,7 @@ def shopList(shopUrl):
|
||||
|
||||
|
||||
def shopOrder(shopUrl, hostid, servicename, torTarget, duration, msatsFirst, msatsNext, description=""):
|
||||
print("#### Placeing order ...")
|
||||
print("#### Placing order ...")
|
||||
shopUrl = normalizeShopUrl(shopUrl)
|
||||
orderid = apiPlaceOrderNew(session, shopUrl, hostid, torTarget)
|
||||
|
||||
|
@ -212,7 +212,7 @@ def dynu_update(domain, token, ip):
|
||||
|
||||
def subscriptions_new(ip, dnsservice, domain, token, target):
|
||||
|
||||
# check if already one subscrption exists (limit to just one)
|
||||
# check if already one subscription exists (limit to just one)
|
||||
# https://github.com/rootzoll/raspiblitz/issues/1786
|
||||
if Path(SUBSCRIPTIONS_FILE).is_file():
|
||||
subs = toml.load(SUBSCRIPTIONS_FILE)
|
||||
@ -296,7 +296,7 @@ def subscriptions_new(ip, dnsservice, domain, token, target):
|
||||
eprint(str(err))
|
||||
if out.find("error=") > -1:
|
||||
time.sleep(6)
|
||||
raise BlitzError("letsancrypt acme failed", out)
|
||||
raise BlitzError("letsencrypt acme failed", out)
|
||||
|
||||
print("# OK - LETSENCRYPT DOMAIN IS READY")
|
||||
return subscription
|
||||
@ -353,7 +353,7 @@ def get_subscription(subscription_id):
|
||||
|
||||
|
||||
def get_domain_by_ip(ip):
|
||||
# does subscriptin file exists
|
||||
# does subscription file exists
|
||||
if Path(SUBSCRIPTIONS_FILE).is_file():
|
||||
subs = toml.load(SUBSCRIPTIONS_FILE)
|
||||
else:
|
||||
@ -393,7 +393,7 @@ def menu_make_subscription():
|
||||
"\nChoose a free DNS service to work with:",
|
||||
choices=choices, width=60, height=10, title="Select Service")
|
||||
|
||||
# if user chosses CANCEL
|
||||
# if user chooses CANCEL
|
||||
if code != d.OK:
|
||||
sys.exit(0)
|
||||
|
||||
@ -427,8 +427,8 @@ If you havent already go to https://duckdns.org
|
||||
# check for valid input
|
||||
if len(subdomain) == 0:
|
||||
Dialog(dialog="dialog", autowidgetsize=True).msgbox('''
|
||||
This looks not like a valid subdomain.
|
||||
''', title="Unvalid Input")
|
||||
This does not look like a valid subdomain.
|
||||
''', title="Invalid Input")
|
||||
sys.exit(0)
|
||||
|
||||
# enter the token
|
||||
@ -446,7 +446,7 @@ This looks not like a valid subdomain.
|
||||
token = ""
|
||||
if len(token) < 20:
|
||||
Dialog(dialog="dialog", autowidgetsize=True).msgbox('''
|
||||
This looks not like a valid token.
|
||||
This does not look like a valid token.
|
||||
''', title="Invalid Input")
|
||||
sys.exit(0)
|
||||
|
||||
@ -468,7 +468,7 @@ If you havent already go to https://dynu.com
|
||||
domain = text.strip()
|
||||
if len(domain) < 6:
|
||||
Dialog(dialog="dialog", autowidgetsize=True).msgbox('''
|
||||
This looks not like a valid DDNS.
|
||||
This does not look like a valid DDNS.
|
||||
''', title="Invalid Input")
|
||||
sys.exit(0)
|
||||
os.system("clear")
|
||||
@ -490,7 +490,7 @@ Continue in your dynu.com account:
|
||||
clientid = clientid.split(' ')[0]
|
||||
if len(clientid) < 20 or len(clientid.split('-'))<2:
|
||||
Dialog(dialog="dialog", autowidgetsize=True).msgbox('''
|
||||
This looks not like valid ClientID.
|
||||
This does not look like a valid ClientID.
|
||||
''', title="Invalid Input")
|
||||
sys.exit(0)
|
||||
|
||||
@ -503,7 +503,7 @@ This looks not like valid ClientID.
|
||||
secret = secret.split(' ')[0]
|
||||
if len(secret) < 10:
|
||||
Dialog(dialog="dialog", autowidgetsize=True).msgbox('''
|
||||
This looks not like valid.
|
||||
This does not look like a valid SECRET.
|
||||
''', title="Invalid Input")
|
||||
sys.exit(0)
|
||||
|
||||
@ -570,11 +570,11 @@ Create one first and try again.
|
||||
"\nChoose the IP2TOR subscription:",
|
||||
choices=choices, width=60, height=10, title="Select")
|
||||
|
||||
# if user chosses CANCEL
|
||||
# if user chooses CANCEL
|
||||
if code != d.OK:
|
||||
sys.exit(0)
|
||||
|
||||
# get the slected IP2TOR bridge
|
||||
# get the selected IP2TOR bridge
|
||||
ip2tor_select = ip2tor_subs[int(tag)]
|
||||
ip = ip2tor_select["ip"]
|
||||
serviceName = ip2tor_select["name"]
|
||||
@ -582,7 +582,7 @@ Create one first and try again.
|
||||
|
||||
elif tag == "DYNDNS":
|
||||
|
||||
# the subscriptioNew method will handle acrivating the dnydns part
|
||||
# the subscriptioNew method will handle activating the dnydns part
|
||||
ip = "dyndns"
|
||||
|
||||
elif tag == "STATIC":
|
||||
@ -602,7 +602,7 @@ Create one first and try again.
|
||||
ip = ""
|
||||
if len(ip) == 0:
|
||||
Dialog(dialog="dialog", autowidgetsize=True).msgbox('''
|
||||
This looks not like a valid IP.
|
||||
This does not look like a valid IP.
|
||||
''', title="Invalid Input")
|
||||
sys.exit(0)
|
||||
|
||||
@ -631,7 +631,7 @@ to reach the service you wanted.
|
||||
# https://github.com/rootzoll/raspiblitz/issues/1772
|
||||
if "failed oAuth Service" in str(e):
|
||||
Dialog(dialog="dialog", autowidgetsize=True).msgbox('''
|
||||
A temporary error with the DYNU API happend:\nUnvalid OAuth Bearer Token
|
||||
A temporary error with the DYNU API happened:\nInvalid OAuth Bearer Token
|
||||
Please try again later or choose another dynamic domain service.
|
||||
''', title="Exception on Subscription")
|
||||
sys.exit(1)
|
||||
|
@ -112,7 +112,7 @@ You have no active or inactive subscriptions.
|
||||
"\nYou have the following subscriptions - select for details:",
|
||||
choices=choices, cancel_label="Back", width=65, height=15, title="My Subscriptions")
|
||||
|
||||
# if user chosses CANCEL
|
||||
# if user chooses CANCEL
|
||||
if code != d.OK:
|
||||
return
|
||||
|
||||
@ -234,7 +234,7 @@ def main():
|
||||
"\nCheck existing subscriptions or create new:",
|
||||
choices=choices, width=50, height=10, title="Subscription Management")
|
||||
|
||||
# if user chosses CANCEL
|
||||
# if user chooses CANCEL
|
||||
if code != d.OK:
|
||||
sys.exit(0)
|
||||
|
||||
@ -334,7 +334,7 @@ def main():
|
||||
"\nChoose RaspiBlitz Service to create Bridge for:",
|
||||
choices=choices, width=60, height=10, title="Select Service")
|
||||
|
||||
# if user chosses CANCEL
|
||||
# if user chooses CANCEL
|
||||
if code != d.OK:
|
||||
sys.exit(0)
|
||||
|
||||
@ -416,7 +416,7 @@ def main():
|
||||
|
||||
# action after possibly new created bride
|
||||
if service_name == SERVICE_SPHINX:
|
||||
print("# restarting services to pickup new public url (please wait) ...")
|
||||
print("# restarting services to pickup new public URL (please wait) ...")
|
||||
os.system("sudo systemctl restart sphinxrelay")
|
||||
time.sleep(8)
|
||||
|
||||
|
@ -50,7 +50,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
yes | npm install -g @angular/cli
|
||||
echo "# link ng"
|
||||
sudo ln -sf /usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin/ng /usr/bin/ng
|
||||
echo "# explicit trun off statistics report"
|
||||
echo "# explicit turn off statistics report"
|
||||
ng analytics off
|
||||
|
||||
# check if nodeJS was installed
|
||||
|
@ -168,7 +168,7 @@ fi
|
||||
|
||||
# update
|
||||
if [ "$1" = "update" ]; then
|
||||
echo "# Updating Circuit Braker"
|
||||
echo "# Updating Circuit Breaker"
|
||||
cd /home/circuitbreaker/circuitbreaker
|
||||
# from https://github.com/apotdevin/thunderhub/blob/master/scripts/updateToLatest.sh
|
||||
# fetch latest master
|
||||
|
@ -47,7 +47,7 @@ You can *optionally* enter an eMail address.\n
|
||||
\n
|
||||
The address will not be included in the generated certificates.\n
|
||||
\n
|
||||
It will be used to e.g. notify you about certificate expiries and changes
|
||||
It will be used to e.g. notify you about certificate expiration and changes
|
||||
to the Terms of Service of Let's Encrypt.\n
|
||||
\n
|
||||
Feel free to leave empty."
|
||||
@ -164,7 +164,7 @@ function refresh_certs_with_nginx() {
|
||||
sudo ln -s ${ACME_CERT_HOME}/${FQDN}_ecc/${FQDN}.key /mnt/hdd/app-data/nginx/tls.key
|
||||
fi
|
||||
|
||||
# repleace certs for tor
|
||||
# replace certs for tor
|
||||
if [ "${options}" == "tor" ] || [ "${options}" == "ip&tor" ]; then
|
||||
echo "# replacing TOR certs for ${FQDN}"
|
||||
sudo rm /mnt/hdd/app-data/nginx/tor_tls.cert
|
||||
@ -250,7 +250,7 @@ elif [ "$1" = "issue-cert" ]; then
|
||||
|
||||
# check if letsencrypt is on
|
||||
if [ "${letsencrypt}" != "on" ]; then
|
||||
echo "error='letsenscrypt is not on'"
|
||||
echo "error='letsencrypt is not on'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -289,7 +289,7 @@ elif [ "$1" = "issue-cert" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create certicicates
|
||||
# create certificates
|
||||
echo "# creating certs for ${FQDN}"
|
||||
$ACME_INSTALL_HOME/acme.sh --home "${ACME_INSTALL_HOME}" --config-home "${ACME_CONFIG_HOME}" --cert-home "${ACME_CERT_HOME}" --issue --dns ${dnsservice} -d ${FQDN} --keylength ec-256 2>&1
|
||||
success1=$($ACME_INSTALL_HOME/acme.sh --list --home "${ACME_INSTALL_HOME}" --config-home "${ACME_CONFIG_HOME}" --cert-home "${ACME_CERT_HOME}" | grep -c "${FQDN}")
|
||||
@ -324,7 +324,7 @@ elif [ "$1" = "remove-cert" ]; then
|
||||
|
||||
# check if letsencrypt is on
|
||||
if [ "${letsencrypt}" != "on" ]; then
|
||||
echo "error='letsenscrypt is not on'"
|
||||
echo "error='letsencrypt is not on'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -65,7 +65,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
if [ ${goodSignature} -gt 0 ] && [ ${correctKey} -gt 0 ]; then
|
||||
echo "# OK signature is valid"
|
||||
else
|
||||
echo "error='unvalid signature'"
|
||||
echo "error='invalid signature'"
|
||||
sudo rm -rf /home/admin/lndmanage
|
||||
sleep 5
|
||||
exit 1
|
||||
@ -81,7 +81,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# install lndmanage
|
||||
# python3 -m pip install lndmanage==0.11.0
|
||||
|
||||
# check if install was successfull
|
||||
# check if install was successful
|
||||
if [ $(python3 -m pip list | grep -c "lndmanage") -eq 0 ]; then
|
||||
echo
|
||||
echo "#!! FAIL --> Was not able to install LNDMANAGE"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# !! NOTICE: Faraday is now prt of the 'bonus.lit.sh' bundle
|
||||
# !! NOTICE: Faraday is now part of the 'bonus.lit.sh' bundle
|
||||
# this single install script will still be available for now
|
||||
# but main focus for the future development should be on LIT
|
||||
|
||||
|
@ -411,7 +411,7 @@ if [ "$1" = "update" ]; then
|
||||
sudo systemctl restart nginx
|
||||
|
||||
# Remove useless deps
|
||||
echo "Removing unneccesary modules..."
|
||||
echo "Removing unnecessary modules..."
|
||||
npm prune --production
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# !! NOTICE: Pool is now prt of the 'bonus.lit.sh' bundle
|
||||
# !! NOTICE: Pool is now part of the 'bonus.lit.sh' bundle
|
||||
# this single install script will still be available for now
|
||||
# but main focus for the future development should be on LIT
|
||||
|
||||
@ -190,7 +190,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
|
||||
# make systemd service
|
||||
if [ "${runBehindTor}" = "on" ]; then
|
||||
echo " # Connect tothe Pool server through Tor"
|
||||
echo " # Connect to the Pool server through Tor"
|
||||
proxy="torify"
|
||||
else
|
||||
echo "# Connect to Pool server through clearnet"
|
||||
|
@ -263,7 +263,7 @@ if [ "$1" = "status" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# determnine the public url for the pairing code based on best setup
|
||||
# determine the public url for the pairing code based on best setup
|
||||
connection=""
|
||||
publicURL=""
|
||||
|
||||
@ -411,7 +411,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
if [ "${runBehindTor}" = "on" ]; then
|
||||
# make sure to keep in sync with internet.tor.sh script
|
||||
/home/admin/config.scripts/internet.hiddenservice.sh sphinxrelay 80 3302 443 3303
|
||||
# get TOR address and store it readable for sphixrelay user
|
||||
# get TOR address and store it readable for sphinxrelay user
|
||||
toraddress=$(sudo cat /mnt/hdd/tor/sphinxrelay/hostname 2>/dev/null)
|
||||
sudo -u sphinxrelay bash -c "echo '${toraddress}' > /home/sphinxrelay/sphinx-relay/dist/toraddress.txt"
|
||||
fi
|
||||
|
@ -58,7 +58,7 @@ KRAKEN_API_SECRET="privateKeyFromTheKrakenSettings"
|
||||
KRAKEN_API_FIAT="USD"
|
||||
KRAKEN_BUY_AMOUNT=21
|
||||
|
||||
# Enable this to buy at market price instad of placing a limit order
|
||||
# Enable this to buy at market price instead of placing a limit order
|
||||
# KRAKEN_ORDER_TYPE="market"
|
||||
|
||||
# Pay fee in this currency, e.g. buying XBT for USD and paying fee in XBT
|
||||
|
@ -64,7 +64,7 @@ fi
|
||||
# switch on
|
||||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "*** INSTALL TELEGRAF ***"
|
||||
# soure and target dir for copy operation
|
||||
# source and target dir for copy operation
|
||||
telegraf_source_dir=${resources_dir}
|
||||
telegraf_target_dir=/etc/telegraf
|
||||
#
|
||||
@ -72,7 +72,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
telegraf_conf_file=${telegraf_target_dir}/telegraf.conf
|
||||
|
||||
echo "*** telegraf installation: apt-get part"
|
||||
# get the repository publy key for apt-get
|
||||
# get the repository public key for apt-get
|
||||
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
|
||||
DISTRIB_ID=$(lsb_release -c -s)
|
||||
#
|
||||
@ -122,7 +122,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# telegrafInfluxPassword
|
||||
#
|
||||
echo "*** telegraf installation: telegrafInfluxUrl = '${telegrafInfluxUrl}'"
|
||||
# due to the occurance of '/' in the ${telegrafInfluxUrl} we need to switch to '#' as the sed-separator
|
||||
# due to the occurrence of '/' in the ${telegrafInfluxUrl} we need to switch to '#' as the sed-separator
|
||||
sudo sed -i "s#^urls = .*#urls = \[\"${telegrafInfluxUrl}\"\]#g" ${telegraf_conf_file}
|
||||
#
|
||||
# the other replacements work with the std separator '/'
|
||||
|
@ -24,7 +24,7 @@ whiptail --title " Info ZeroTier " --msgbox "\n\
|
||||
Manage your ZeroTier account at https://my.zerotier.com. Add additional devices
|
||||
(desktop/laptop/mobile) to your network so they can communicate.\n\n\
|
||||
|
||||
Currentlly connected to: $(echo $networkDetails | awk '{ print $3}')\n
|
||||
Currently connected to: $(echo $networkDetails | awk '{ print $3}')\n
|
||||
Assigned IP: $(echo $networkDetails | awk '{ print $9}')\n\n\
|
||||
|
||||
Find more information on how to get started:\n
|
||||
|
@ -34,7 +34,7 @@ https://github.com/rootzoll/raspiblitz/#a-dropbox-backup-target" 11 70 2>/home/a
|
||||
shred -u /home/admin/.tmp
|
||||
fi
|
||||
|
||||
# set in config - that acivates the dropbox back in background process
|
||||
# set in config - that activates the dropbox back in background process
|
||||
if [ ${#authtoken} -gt 0 ]; then
|
||||
if [ ${#dropboxBackupTarget} -eq 0 ]; then
|
||||
echo "dropboxBackupTarget='${authtoken}'" >> /mnt/hdd/raspiblitz.conf
|
||||
@ -118,7 +118,7 @@ elif [ "${MODE}" == "upload" ]; then
|
||||
fi
|
||||
|
||||
else
|
||||
echo "err='unkown mode'"
|
||||
echo "err='unknown mode'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -29,7 +29,7 @@ if [ "${DNSSERVER}" = "test" ]; then
|
||||
|
||||
# dns is not working --> ask in dialog to set a preset DNS
|
||||
whiptail --title ' DNS Test Failed ' --yes-button='Set DNS 1.1.1.1' --no-button='Ignore' --yesno "It looks like your DNS within local network is not working.\n
|
||||
Do you want to set the fixed DNS 1.1.1.1 by cloudfare (they claim they provide privacy) for your RaspiBlitz and reboot?\n
|
||||
Do you want to set the fixed DNS 1.1.1.1 by Cloudflare (they claim they provide privacy) for your RaspiBlitz and reboot?\n
|
||||
" 10 64
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "# SETTING 1.1.1.1"
|
||||
|
@ -31,19 +31,19 @@ isValidIP() {
|
||||
# IPv6
|
||||
echo 1
|
||||
else
|
||||
# unkown
|
||||
# unknown
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################
|
||||
# by deafult ipv6 is off (for publicIP)
|
||||
# by default ipv6 is off (for publicIP)
|
||||
if [ "${ipv6}" = "" ]; then
|
||||
ipv6="off"
|
||||
fi
|
||||
|
||||
#############################################
|
||||
# get active network device (eth0 or wlan0) & trafiic
|
||||
# get active network device (eth0 or wlan0) & traffic
|
||||
networkDevice=$(ip addr | grep -v "lo:" | grep 'state UP' | tr -d " " | cut -d ":" -f2 | head -n 1)
|
||||
# get network traffic
|
||||
# ifconfig does not show eth0 on Armbian or in a VM - get first traffic info
|
||||
@ -164,11 +164,11 @@ if [ ${runGlobal} -eq 1 ]; then
|
||||
|
||||
##########################################
|
||||
# Public IP
|
||||
# the public that is maybe set by raspibitz config file (overriding aut-detection)
|
||||
# the public that is maybe set by raspiblitz config file (overriding aut-detection)
|
||||
if [ "${publicIP}" == "" ]; then
|
||||
# if publicIP is not set by config ... use detected global IP
|
||||
if [ "${ipv6}" == "on" ]; then
|
||||
# use ipv6 with brackes so that it can be used in http addresses like a IPv4
|
||||
# use ipv6 with brackets so that it can be used in http addresses like a IPv4
|
||||
publicIP="[${globalIP}]"
|
||||
else
|
||||
publicIP="${globalIP}"
|
||||
@ -201,7 +201,7 @@ if [ "$1" == "status" ]; then
|
||||
echo "globalip=${globalIP}"
|
||||
echo "# publicip --> may consider the static IP overide by raspiblitz config"
|
||||
echo "publicip=${publicIP}"
|
||||
echo "# cleanip --> the publicip with no brakets like used on IPv6"
|
||||
echo "# cleanip --> the publicip with no brackets like used on IPv6"
|
||||
echo "cleanip=${cleanIP}"
|
||||
else
|
||||
echo "# for more global internet info use 'status global'"
|
||||
@ -219,7 +219,7 @@ elif [ "$1" == "update-publicip" ]; then
|
||||
else
|
||||
echo "ip_changed=1"
|
||||
if [ "${ipv6}" == "on" ]; then
|
||||
# use ipv6 with brackes so that it can be used in http addresses like a IPv4
|
||||
# use ipv6 with brackets so that it can be used in http addresses like a IPv4
|
||||
publicIP="[${globalIP}]"
|
||||
else
|
||||
publicIP="${globalIP}"
|
||||
|
@ -5,7 +5,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
echo "# config script to init/show/transfer ssh pub keys."
|
||||
echo "# -> return pubkey (and will init if needed):"
|
||||
echo "# internet.sshpubkey.sh get"
|
||||
echo "# -> transfer ssh-pub to a authorizedkey of remote server:"
|
||||
echo "# -> transfer ssh-pub to a authorized key of remote server:"
|
||||
echo "# internet.sshpubkey.sh transfer [REMOTEUSER]@[REMOTESERVER]"
|
||||
echo "err='just informational output'"
|
||||
exit 1
|
||||
|
@ -4,7 +4,7 @@ import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# IDEA: At the momemt its just Reverse-SSh Tunnels thats why [INTERNAL-PORT]<[EXTERNAL-PORT]
|
||||
# IDEA: At the moment its just Reverse-SSH Tunnels thats why [INTERNAL-PORT]<[EXTERNAL-PORT]
|
||||
# For the future also just local ssh tunnels could be added with [INTERNAL-PORT]-[EXTERNAL-PORT]
|
||||
# for the use case when a server wants to use a RaspiBlitz behind a NAT as Lightning backend
|
||||
|
||||
|
@ -388,7 +388,7 @@ EOF
|
||||
sudo -u sphinxrelay bash -c "echo '${toraddress}' > /home/sphinxrelay/sphinx-relay/dist/toraddress.txt"
|
||||
fi
|
||||
|
||||
# get TOR address and store it readable for sphixrelay user
|
||||
# get TOR address and store it readable for sphinxrelay user
|
||||
toraddress=$(sudo cat /mnt/hdd/tor/sphinxrelay/hostname 2>/dev/null)
|
||||
sudo -u sphinxrelay bash -c "echo '${toraddress}' > /home/sphinxrelay/sphinx-relay/dist/toraddress.txt"
|
||||
|
||||
|
@ -55,7 +55,7 @@ network={
|
||||
|
||||
# activate new wifi settings
|
||||
sudo wpa_cli -i wlan0 reconfigure 1>/dev/null
|
||||
echo "# OK - changes should be actrive now - maybe reboot needed"
|
||||
echo "# OK - changes should be active now - maybe reboot needed"
|
||||
exit 0
|
||||
|
||||
elif [ "$1" == "off" ]; then
|
||||
@ -73,7 +73,7 @@ update_config=1"
|
||||
|
||||
# activate new wifi settings
|
||||
sudo wpa_cli -i wlan0 reconfigure 1>/dev/null
|
||||
echo "# OK - changes should be actrive now - maybe reboot needed"
|
||||
echo "# OK - changes should be active now - maybe reboot needed"
|
||||
exit 0
|
||||
|
||||
# https://github.com/rootzoll/raspiblitz/issues/560
|
||||
|
@ -61,6 +61,6 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "FAIL - Unknown Paramter $1"
|
||||
echo "FAIL - Unknown Parameter $1"
|
||||
echo "may needs reboot to run normal again"
|
||||
exit 1
|
@ -58,6 +58,6 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "FAIL - Unknown Paramter $1"
|
||||
echo "FAIL - Unknown Parameter $1"
|
||||
echo "may needs reboot to run normal again"
|
||||
exit 1
|
@ -100,7 +100,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
# setting value in raspi blitz config
|
||||
sudo sed -i "s/^autoUnlock=.*/autoUnlock=off/g" /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# delete password C securly
|
||||
# delete password C securely
|
||||
echo "# shredding password on for RaspiBlitz Auto-Unlock"
|
||||
sudo shred -u /root/lnd.autounlock.pwd 2>/dev/null
|
||||
|
||||
|
@ -131,7 +131,7 @@ if [ "$1" == "basic-setup" ]; then
|
||||
else
|
||||
echo "macaroonCopy=0"
|
||||
echo "macaroonMismatch=0"
|
||||
echo "err='admin.macaroon is missing for user admin"
|
||||
echo "err='admin.macaroon is missing for user admin'"
|
||||
fi
|
||||
|
||||
# check for walletDB exist
|
||||
|
@ -26,7 +26,7 @@ function copy_mac_set_perms() {
|
||||
}
|
||||
|
||||
function check_macaroons() {
|
||||
macaroons="admin.macaroon invoice.macaroon readonly.macaroon invoices.macaroon chainnotifier.macaroon signer.macaroon walletkit.macaroon router.macaroon"
|
||||
macaroons="admin.macaroon invoice.macaroon readonly.macaroon invoices.macaroon chainnotifier.macaroon signer.macaroon walletkit.macaroon router.macaroon"
|
||||
missing=0
|
||||
for macaroon in $macaroons
|
||||
do
|
||||
@ -67,7 +67,7 @@ if [ "$1" = "reset" ]; then
|
||||
keepOldMacaroons=0
|
||||
fi
|
||||
if [ "$2" == "keepold" ]; then
|
||||
echo "# add the missing default macaroons without deauthenticating the old ones"
|
||||
echo "# add the missing default macaroons without de-authenticating the old ones"
|
||||
resetTLS=0
|
||||
resetMacaroons=1
|
||||
keepOldMacaroons=1
|
||||
|
@ -11,7 +11,7 @@ fi
|
||||
|
||||
portnumber=$1
|
||||
|
||||
# check port numer is a integer
|
||||
# check port number is a integer
|
||||
if ! [ "$portnumber" -eq "$portnumber" ] 2> /dev/null
|
||||
then
|
||||
echo "FAIL - portnumber(${portnumber}) not a number"
|
||||
|
@ -168,7 +168,7 @@ if [ "${mode}" = "verified" ]; then
|
||||
echo "fingerprint='${fingerprint}'"
|
||||
|
||||
echo
|
||||
echo "# checking gpg finger print"
|
||||
echo "# checking PGP finger print"
|
||||
gpg --import ./pgp_keys.asc
|
||||
sleep 3
|
||||
verifyResult=$(gpg --verify manifest-${PGPauthor}-v${lndUpdateVersion}.sig manifest-v${lndUpdateVersion}.txt 2>&1)
|
||||
|
@ -94,10 +94,10 @@ if [ "$1" = "peer-kickstart" ]; then
|
||||
fi
|
||||
# check valid value
|
||||
if [ "${addressFormat}" != "ipv4" ] && [ "${addressFormat}" != "ipv6" ] && [ "${addressFormat}" != "tor" ] && [ "${addressFormat}" != "auto" ]; then
|
||||
echo "error='unvalid network type'"
|
||||
echo "error='invalid network type'"
|
||||
exit 1
|
||||
fi
|
||||
# if auto then deterine whats running
|
||||
# if auto then determine whats running
|
||||
if [ "${addressFormat}" == "auto" ]; then
|
||||
if [ "${runBehindTor}" == "on" ]; then
|
||||
addressFormat="tor"
|
||||
@ -123,8 +123,8 @@ if [ "$1" = "peer-kickstart" ]; then
|
||||
# get IPv6 nodes
|
||||
nodeList=$(echo "${bitnodesRawData}" | grep -o '\[.\{5,45\}\]\:[0-9]\{3,5\}')
|
||||
else
|
||||
# unvalid address
|
||||
echo "error='unvalid 2nd parameter'"
|
||||
# invalid address
|
||||
echo "error='invalid 2nd parameter'"
|
||||
exit 1
|
||||
fi
|
||||
#echo "${nodeList}"
|
||||
|
@ -69,6 +69,6 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "FAIL - Unknown Paramter $1"
|
||||
echo "FAIL - Unknown Parameter $1"
|
||||
echo "may needs reboot to run normal again"
|
||||
exit 1
|
Loading…
x
Reference in New Issue
Block a user