mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-19 04:00:34 +02:00
fix check for existing files
This commit is contained in:
@@ -486,7 +486,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
sudo /home/admin/config.scripts/blitz.datadrive.sh link
|
||||
|
||||
# copy over the raspiblitz.conf created from setup to HDD
|
||||
configExists=$(ls /mnt/hdd/raspiblitz.conf | grep -c "raspiblitz.conf")
|
||||
configExists=$(ls /mnt/hdd/raspiblitz.conf 2>/dev/null | grep -c "raspiblitz.conf")
|
||||
if [ "${configExists}" != "1" ]; then
|
||||
sudo cp /var/cache/raspiblitz/temp/raspiblitz.conf /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
|
@@ -20,7 +20,7 @@ if [ "$1" = "peer-status" ]; then
|
||||
|
||||
# if second parameter is "cached" deliver cahed result if available
|
||||
if [ "$2" == "cached" ]; then
|
||||
cacheExists=$(ls /var/cache/raspiblitz/temp/network.monitor.peer-status.cache | grep -c "etwork.monitor.peer-status.cache")
|
||||
cacheExists=$(ls /var/cache/raspiblitz/temp/network.monitor.peer-status.cache 2>/dev/null | grep -c "etwork.monitor.peer-status.cache")
|
||||
if [ "${cacheExists}" == "1" ]; then
|
||||
echo "cached=1"
|
||||
cat /var/cache/raspiblitz/temp/network.monitor.peer-status.cache
|
||||
|
Reference in New Issue
Block a user