Skip to content

Commit d8af252

Browse files
authored
Issue #247 Ensure systemd-journal-gatewayd socket is correct (#277)
* Create systemd socket override for systemd-journal-gatewayd As stated in #247 the default action for systemd-journal-gatewayd is to listen on HTTP port while Supervisor needs Unix socket file that's bind mounted in Docker container. This override changes socket location. * Check and fix systemd socket file As stated in #247 with the default setup the path /run/systemd-journal-gatewayd.sock may be a directory, not a file, we have to fix that * Remove unnecessary unit file Socket location change has been moved to systemd override which is the suggested way of changing original packaged unit behavior * Rename hassio-supervisor.conf to 10-hassio-supervisor.conf
1 parent d135a92 commit d8af252

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

homeassistant-supervised/DEBIAN/postinst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ if [ "$(systemctl is-active systemd-resolved)" = 'inactive' ]; then
3131
systemctl start systemd-resolved.service> /dev/null 2>&1;
3232
fi
3333

34+
# Check and fix systemd-journal-gatewayd socket location
35+
if [ ! -S "/run/systemd-journal-gatewayd.sock" ]; then
36+
info "Set up systemd-journal-gatewayd socket file"
37+
if [ "$(systemctl is-active systemd-journal-gatewayd.socket)" = 'active' ]; then
38+
systemctl stop systemd-journal-gatewayd.socket> /dev/null 2>&1;
39+
fi
40+
rm -rf "/run/systemd-journal-gatewayd.sock";
41+
fi
3442
# Enable and start systemd-journal-gatewayd
3543
if [ "$(systemctl is-active systemd-journal-gatewayd.socket)" = 'inactive' ]; then
3644
info "Enable systemd-journal-gatewayd"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[Socket]
2+
ListenStream=
3+
ListenStream=/run/systemd-journal-gatewayd.sock

homeassistant-supervised/usr/lib/systemd/system/systemd-journal-gatewayd.socket

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)