Fixed file changes in scripts.
This commit is contained in:
@@ -211,16 +211,16 @@ files_generation() {
|
||||
|
||||
if [[ -n "$DEVICES_BLOCK" ]]; then
|
||||
REPLACEMENT="devices:\n${DEVICES_BLOCK%\\n}"
|
||||
sed -i.bak "s|# --- frigate devices --- #|$REPLACEMENT|" docker/frigate.nix
|
||||
sed -i.bak "s|# --- frigate devices --- #|$REPLACEMENT|" docker/frigate.original
|
||||
else
|
||||
sed -i.bak "/# --- frigate devices --- #/d" docker/frigate.nix
|
||||
sed -i.bak "/# --- frigate devices --- #/d" docker/frigate.original
|
||||
fi
|
||||
|
||||
if [[ -n "$TARGET_ZIGBEE_DEVICE" ]]; then
|
||||
REPLACEMENT="devices:\n - /dev/serial/by-id/${TARGET_ZIGBEE_DEVICE}:/dev/ttyUSB0"
|
||||
sed -i.bak "s|# --- hass devices --- #|$REPLACEMENT|" docker/hass.nix
|
||||
sed -i.bak "s|# --- hass devices --- #|$REPLACEMENT|" docker/hass.original
|
||||
else
|
||||
sed -i.bak "/# --- hass devices --- #/d" docker/hass.nix
|
||||
sed -i.bak "/# --- hass devices --- #/d" docker/hass.original
|
||||
fi
|
||||
|
||||
echo -e "\n\n ✅ Copying configuration files for the selected homelab services..."
|
||||
|
||||
Reference in New Issue
Block a user