mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-05 10:28:10 +02:00
make new scripts use blitz.conf.sh
This commit is contained in:
parent
72bfa88861
commit
ab53050e3f
home.admin/config.scripts
@ -48,11 +48,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo sed -i "s/^WALL=.*/#WALL=wall/g" /etc/apcupsd/apccontrol
|
||||
sudo systemctl enable apcupsd
|
||||
sudo systemctl start apcupsd
|
||||
|
||||
# add default 'ups' raspiblitz.conf if needed
|
||||
if [ ${#ups} -eq 0 ]; then
|
||||
echo "ups=on" >> /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
|
||||
# set ups config value (in case of update)
|
||||
/home/admin/config.scripts/blitz.conf.sh set ups "apcusb"
|
||||
|
@ -7,7 +7,6 @@ SERVER_PORT=3030
|
||||
APP_DATA_DIR=/mnt/hdd/app-data/kindle-display
|
||||
HOME_DIR=/home/$USERNAME
|
||||
CONFIG_FILE=$APP_DATA_DIR/.env
|
||||
RASPIBLITZ_FILE=/mnt/hdd/raspiblitz.conf
|
||||
APP_ROOT_DIR=$HOME_DIR/kindle-display
|
||||
APP_SERVER_DIR=$APP_ROOT_DIR/server
|
||||
CRON_FILE=$APP_SERVER_DIR/cron.sh
|
||||
|
@ -666,10 +666,7 @@ if [ "$1" = "switch" ]; then
|
||||
fi
|
||||
|
||||
# set raspiblitz config value for funding
|
||||
if ! grep -Eq "^LNBitsFunding=" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "LNBitsFunding=" >> /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
sudo sed -i "s/^LNBitsFunding=.*/LNBitsFunding=${fundingsource}/g" /mnt/hdd/raspiblitz.conf
|
||||
/home/admin/config.scripts/blitz.conf.sh set LNBitsFunding "${fundingsource}"
|
||||
|
||||
echo "##############"
|
||||
echo "# OK new fundig source set - does need restart or call: sudo systemctl restart lnbits"
|
||||
|
@ -6,7 +6,6 @@ USERNAME=stackingsats
|
||||
APP_DATA_DIR=/mnt/hdd/app-data/stacking-sats-kraken
|
||||
HOME_DIR=/home/$USERNAME
|
||||
CONFIG_FILE=$APP_DATA_DIR/.env
|
||||
RASPIBLITZ_FILE=/mnt/hdd/raspiblitz.conf
|
||||
SCRIPT_DIR=$HOME_DIR/stacking-sats-kraken
|
||||
SCRIPT_NAME=stacksats.sh
|
||||
SCRIPT_VERSION=0.4.4
|
||||
|
@ -16,9 +16,6 @@ usage(){
|
||||
exit 1
|
||||
}
|
||||
|
||||
# add default value to raspi config if needed
|
||||
sudo grep -q "runBehindTor" /mnt/hdd/raspiblitz.conf || { echo "runBehindTor=off" | sudo tee -a /mnt/hdd/raspiblitz.conf; }
|
||||
|
||||
activateBitcoinOverTor()
|
||||
{
|
||||
echo "*** Changing ${network} Config ***"
|
||||
@ -80,6 +77,9 @@ curl --socks5 127.0.0.1:9050 --socks5-hostname 127.0.0.1:9050 -m 5 -s https://ch
|
||||
case "$1" in
|
||||
|
||||
status)
|
||||
if [ "${runBehindTor}" = "" ]; then
|
||||
runBehindTor="off"
|
||||
fi
|
||||
echo "torEnabled=${runBehindTor}"
|
||||
echo "torActive=${torActive}"
|
||||
echo "torFunctional=${torFunctional}"
|
||||
@ -105,7 +105,7 @@ case "$1" in
|
||||
fi
|
||||
|
||||
# setting value in raspi blitz config
|
||||
sudo sed -i "s/^runBehindTor=.*/runBehindTor=on/g" /mnt/hdd/raspiblitz.conf
|
||||
/home/admin/config.scripts/blitz.conf.sh set runBehindTor "on"
|
||||
|
||||
# ACTIVATE BITCOIN OVER TOR (function call)
|
||||
activateBitcoinOverTor
|
||||
@ -160,7 +160,7 @@ EOF
|
||||
echo "# switching Tor OFF"
|
||||
|
||||
# setting value in raspi blitz config
|
||||
sudo sed -i "s/^runBehindTor=.*/runBehindTor=off/g" /mnt/hdd/raspiblitz.conf
|
||||
/home/admin/config.scripts/blitz.conf.sh set runBehindTor "off"
|
||||
|
||||
# deactivate bitcoin over tor (function call)
|
||||
deactivateBitcoinOverTor
|
||||
|
Loading…
x
Reference in New Issue
Block a user