mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-26 19:47:05 +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
|
sudo /home/admin/config.scripts/blitz.datadrive.sh link
|
||||||
|
|
||||||
# copy over the raspiblitz.conf created from setup to HDD
|
# 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
|
if [ "${configExists}" != "1" ]; then
|
||||||
sudo cp /var/cache/raspiblitz/temp/raspiblitz.conf /mnt/hdd/raspiblitz.conf
|
sudo cp /var/cache/raspiblitz/temp/raspiblitz.conf /mnt/hdd/raspiblitz.conf
|
||||||
fi
|
fi
|
||||||
|
@@ -20,7 +20,7 @@ if [ "$1" = "peer-status" ]; then
|
|||||||
|
|
||||||
# if second parameter is "cached" deliver cahed result if available
|
# if second parameter is "cached" deliver cahed result if available
|
||||||
if [ "$2" == "cached" ]; then
|
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
|
if [ "${cacheExists}" == "1" ]; then
|
||||||
echo "cached=1"
|
echo "cached=1"
|
||||||
cat /var/cache/raspiblitz/temp/network.monitor.peer-status.cache
|
cat /var/cache/raspiblitz/temp/network.monitor.peer-status.cache
|
||||||
|
Reference in New Issue
Block a user