fix check for existing files

This commit is contained in:
rootzoll
2021-07-02 13:32:27 +02:00
parent f542264bc3
commit b59e1f6b1c
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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