Skip to content

Commit

Permalink
Homebridge skript: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHae committed Aug 7, 2018
1 parent a2d1f8e commit 6fcd46b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions linux/deCONZ/usr/bin/deCONZ-homebridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function checkHomebridge {
# create config file if not exists
if [[ -f /home/$MAINUSER/.homebridge/config.json ]]; then
[[ $LOG_DEBUG ]] && echo "${LOG_DEBUG}found existing homebridge config.json"
if [ -z $(cat /home/$MAINUSER/.homebridge/config.json | grep "Phoscon Homebridge") ]; then
if [ -z "$(cat /home/$MAINUSER/.homebridge/config.json | grep "Phoscon Homebridge")" ]; then
# set to not-managed only if homebridge is not set up by phoscon
if [[ "$HOMEBRIDGE" != "not-managed" ]]; then
sqlite3 $ZLLDB "replace into config2 (key, value) values('homebridge', 'not-managed')" &> /dev/null
Expand All @@ -263,8 +263,6 @@ function checkHomebridge {
fi
# create homebridge dir and add Mainuser ownership
mkdir /home/$MAINUSER/.homebridge
#mkdir /home/$MAINUSER/.homebridge/persist
#mkdir /home/$MAINUSER/.homebridge/accessories
touch /home/$MAINUSER/.homebridge/config.json
chown -R $MAINUSER /home/$MAINUSER/.homebridge

Expand All @@ -284,7 +282,6 @@ function checkHomebridge {
\"${BRIDGEID}\": \"${APIKEY}\"
},
\"sensors\": true,
\"nativeHomeKitSensors\": false,
\"excludeSensorTypes\": [\"CLIPPresence\", \"Geofence\"],
\"lights\": true,
\"hueMotionTemperatureHistory\": true
Expand Down

0 comments on commit 6fcd46b

Please sign in to comment.