-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathset-config.sh
executable file
·55 lines (49 loc) · 1.31 KB
/
set-config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# set.sh
# Copy respective hass files to config folder
# Options are tank | super | pump
# Use nmcli interactive connection editor to set each node IP
# TODO: - Auto config network manager for all nodes
E_NOARGS=75
NM="/etc/NetworkManager/system-connections"
if [ -z "$1" ]
then
echo "Usage: `basename $0` [tank | tank2 | super | pump] [ui]"
exit $E_NOARGS
fi
case $1 in
tank)
cp -t . _tank/*.yaml
# if [ -d "$NM" ]; then
# # Copy network manager configuration
# cp -t /etc/NetworkManager/system-connections _tank/bin/canoasystem
# fi
;;
tank2)
cp -t . _tank2/*.yaml
# if [ -d "$NM" ]; then
# # Copy network manager configuration
# cp -t /etc/NetworkManager/system-connections _tank/bin/canoasystem
# fi
;;
super)
cp -t . _super/*.yaml
# if [ -d "$NM" ]; then
# # Copy network manager configuration
# cp -t /etc/NetworkManager/system-connections _super/bin/wired
# fi
;;
pump)
cp -t . _pump/*.yaml
cp -r _pump/bin/custom_components .
# if [ -d "$NM" ]; then
# # Copy network manager configuration
# cp -t /etc/NetworkManager/system-connections _pump/bin/wired
# fi
;;
esac
## Set UI language to ui-lovelace-$2 if parameter exists
if [ $# -eq 2 ]
then
mv ui-lovelace-$2.yaml ui-lovelace.yaml
fi