mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-29 13:02:35 +02:00
services:use grep to check entries in conf
This commit is contained in:
@@ -11,11 +11,11 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# add default value to raspi config if needed
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
if [ ${#BTCRPCexplorer} -eq 0 ]; then
|
||||
|
||||
# add default value to raspi config if needed
|
||||
if ! grep -Eq "^BTCRPCexplorer=" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "BTCRPCexplorer=off" >> /mnt/hdd/raspiblitz.conf
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
|
||||
# status
|
||||
|
@@ -12,10 +12,10 @@ fi
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# add default value to raspi config if needed
|
||||
if [ ${#BTCPayServer} -eq 0 ]; then
|
||||
if ! grep -Eq "^BTCPayServer=" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "BTCPayServer=off" >> /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
|
||||
|
||||
# stop services
|
||||
echo "making sure services are not running"
|
||||
sudo systemctl stop nbxplorer 2>/dev/null
|
||||
|
@@ -53,9 +53,8 @@ fi
|
||||
|
||||
|
||||
# add default value to raspi config if needed
|
||||
if [ ${#ElectRS} -eq 0 ]; then
|
||||
if ! grep -Eq "^ElectRS=" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "ElectRS=off" >> /mnt/hdd/raspiblitz.conf
|
||||
ElectRS=off
|
||||
fi
|
||||
|
||||
# stop service
|
||||
|
@@ -7,11 +7,11 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# add default value to raspi config if needed
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
if [ ${#lndmanage} -eq 0 ]; then
|
||||
|
||||
# add default value to raspi config if needed
|
||||
if ! grep -Eq "^lndmanage=" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "lndmanage=off" >> /mnt/hdd/raspiblitz.conf
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
|
||||
# install
|
||||
|
@@ -7,11 +7,11 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# add default value to raspi config if needed
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
if [ ${#loop} -eq 0 ]; then
|
||||
|
||||
# add default value to raspi config if needed
|
||||
if ! grep -Eq "^loop=" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "loop=off" >> /mnt/hdd/raspiblitz.conf
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
|
||||
# stop services
|
||||
|
@@ -16,8 +16,10 @@ if [ ${#network} -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# add default value to raspi config if needed
|
||||
if [ ${#rtlWebinterface} -eq 0 ]; then
|
||||
if ! grep -Eq "^rtlWebinterface=" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "rtlWebinterface=off" >> /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user