Skip to content

Commit

Permalink
[change] Removed unnecessary if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
codesankalp committed Apr 27, 2022
1 parent a71471d commit fc265b7
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions openwrt-openwisp-monitoring/files/monitoring.init
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,15 @@ start_service() {
exit 1
fi

if [ -z "$uuid" ] || [ -z "$key" ]; then
until [ -n "$uuid" ] && [ -n "$key" ]; do
logger -s "waiting for uuid and key to be set" \
-t openwisp-monitoring \
-p daemon.err
sleep 5
config_load openwisp
config_get uuid http uuid
config_get key http key
done
fi
until [ -n "$uuid" ] && [ -n "$key" ]; do
logger -s "waiting for uuid and key to be set" \
-t openwisp-monitoring \
-p daemon.err
sleep 5
config_load openwisp
config_get uuid http uuid
config_get key http key
done

# for openwisp-monitoring
config_load openwisp-monitoring
Expand Down

0 comments on commit fc265b7

Please sign in to comment.