2
2
3
3
# deCONZ device configuration
4
4
5
+ DOCKER_COMPOSE_PATH=./.tmp/docker-compose.tmp.yml
6
+
7
+ if [[ ! -f $DOCKER_COMPOSE_PATH ]]; then
8
+ echo " [deCONZ] Warning: $DOCKER_COMPOSE_PATH does not exist."
9
+ fi
10
+
5
11
device_selection=$( whiptail --radiolist --title " Select deCONZ gateway" --notags \
6
12
" Use the [SPACEBAR] to select your deCONZ gateway from the list below AND MAKE SURE IT IS PLUGGED IN (if not, press [ESC])." 20 78 12 \
7
13
" ConBeeII" " ConBee II " " ON" \
@@ -12,15 +18,27 @@ device_selection=$(whiptail --radiolist --title "Select deCONZ gateway" --notags
12
18
case $device_selection in
13
19
14
20
" ConBeeII" )
15
- cat .templates/deconz/service_conbee_II.yml >> docker-compose.yml
16
- echo " ...copied ConBee II config from template"
21
+ if [[ ! -f ./.templates/deconz/service_conbee_II.yml ]]; then
22
+ echo " Error: ./.templates/deconz/service_conbee_II.yml does not exist."
23
+ else
24
+ cat ./.templates/deconz/service_conbee_II.yml >> $DOCKER_COMPOSE_PATH
25
+ echo " ...copied ConBee II config from template"
26
+ fi
17
27
;;
18
28
" ConBee" )
19
- cat .templates/deconz/service_conbee.yml >> docker-compose.yml
20
- echo " ...copied ConBee config from template"
29
+ if [[ ! -f ./.templates/deconz/service_conbee.yml ]]; then
30
+ echo " Error: ./.templates/deconz/service_conbee.yml does not exist."
31
+ else
32
+ cat ./.templates/deconz/service_conbee.yml >> $DOCKER_COMPOSE_PATH
33
+ echo " ...copied ConBee config from template"
34
+ fi
21
35
;;
22
36
" RaspBee" )
23
- cat .templates/deconz/service_raspbee.yml >> docker-compose.yml
24
- echo " ...copied RaspBee config from template"
37
+ if [[ ! -f ./.templates/deconz/service_raspbee.yml ]]; then
38
+ echo " Error: ./.templates/deconz/service_raspbee.yml does not exist."
39
+ else
40
+ cat ./.templates/deconz/service_raspbee.yml >> $DOCKER_COMPOSE_PATH
41
+ echo " ...copied RaspBee config from template"
42
+ fi
25
43
;;
26
- esac
44
+ esac
0 commit comments