Skip to content

Commit 15f4ab1

Browse files
authored
Add Support For Debian Bookworm (#297)
1 parent 9c6a021 commit 15f4ab1

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ libglib2.0-bin \
2727
network-manager \
2828
dbus \
2929
lsb-release \
30-
systemd-journal-remote -y
30+
systemd-journal-remote \
31+
systemd-resolved -y
3132
```
3233

3334
Step 2: Install Docker-CE with the following command:

homeassistant-supervised/DEBIAN/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Section: base
33
Version: 1.4.3
44
Priority: optional
55
Architecture: all
6-
Depends: curl, bash, docker-ce, dbus, network-manager, apparmor, jq, systemd, os-agent, systemd-journal-remote
6+
Depends: curl, bash, docker-ce, dbus, network-manager, apparmor, jq, systemd, os-agent, systemd-journal-remote, systemd-resolved
77
Maintainer: Matheson Steplock <https://mathesonsteplock.ca/>
88
Homepage: https://www.home-assistant.io/
99
Description: Home Assistant Supervised

homeassistant-supervised/DEBIAN/preinst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,19 @@ warn ""
1212

1313
# Check if we are running on a supported OS
1414
BYPASS_OS_CHECK=${BYPASS_OS_CHECK:-false}
15-
CURRENT_OS=$(lsb_release -d)
16-
if [[ $CURRENT_OS != *"Debian GNU/Linux 11 (bullseye)"* ]]; then
17-
# Strip first feild of string
18-
CURRENT_OS=$(echo $CURRENT_OS | cut -d' ' -f2-)
15+
supported_os=("Debian GNU/Linux 11 (bullseye)" "Debian GNU/Linux 12 (bookworm)")
16+
17+
CURRENT_OS=$(lsb_release -d | awk -F"\t" '{print $2}')
18+
os_supported=false
19+
20+
for os in "${supported_os[@]}"; do
21+
if [[ $os == "$CURRENT_OS" ]]; then
22+
os_supported=true
23+
break
24+
fi
25+
done
26+
27+
if [[ $os_supported == false ]]; then
1928
if [[ $BYPASS_OS_CHECK != "true" ]]; then
2029
error "${CURRENT_OS} is not supported!"
2130
fi

0 commit comments

Comments
 (0)