Skip to content

Commit 34b6019

Browse files
committed
automatically migrate old config tohe new one
1 parent 74d683d commit 34b6019

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

netbird/config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: NetBird
3-
version: v0.30.0
3+
version: v0.30.0.1
44
slug: netbird
55
description: Connect your devices into a single secure private WireGuard®-based mesh network.
66
url: https://github.com/netbirdio/addon-netbird
@@ -23,6 +23,7 @@ privileged:
2323
- NET_RAW
2424
- BPF
2525
map:
26+
- homeassistant_config
2627
- addon_config:rw
2728
options:
2829
admin_url: ""

netbird/rootfs/etc/s6-overlay/s6-rc.d/netbird/run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ declare value
1010

1111

1212
# Get the options configured in HASS GUI
13+
readonly CONFIG_OLD_PATH=/homeassistant/netbird/config.json
1314
readonly CONFIG_PATH=/config/config.json
1415

16+
[ -f "${CONFIG_OLD_PATH}" ] && mv "${CONFIG_OLD_PATH}" "${CONFIG_PATH}"
17+
1518
admin_url="$(bashio::config 'admin_url')"
1619
management_url="$(bashio::config 'management_url')"
1720
setup_key="$(bashio::config 'setup_key')"

0 commit comments

Comments
 (0)