diff --git a/homeassistant-supervised/DEBIAN/postinst b/homeassistant-supervised/DEBIAN/postinst index dc43ddd..414e8b2 100755 --- a/homeassistant-supervised/DEBIAN/postinst +++ b/homeassistant-supervised/DEBIAN/postinst @@ -31,6 +31,14 @@ if [ "$(systemctl is-active systemd-resolved)" = 'inactive' ]; then systemctl start systemd-resolved.service> /dev/null 2>&1; fi +# Check and fix systemd-journal-gatewayd socket location +if [ ! -S "/run/systemd-journal-gatewayd.sock" ]; then + info "Set up systemd-journal-gatewayd socket file" + if [ "$(systemctl is-active systemd-journal-gatewayd.socket)" = 'active' ]; then + systemctl stop systemd-journal-gatewayd.socket> /dev/null 2>&1; + fi + rm -rf "/run/systemd-journal-gatewayd.sock"; +fi # Enable and start systemd-journal-gatewayd if [ "$(systemctl is-active systemd-journal-gatewayd.socket)" = 'inactive' ]; then info "Enable systemd-journal-gatewayd" diff --git a/homeassistant-supervised/etc/systemd/system/systemd-journal-gatewayd.socket.d/10-hassio-supervisor.conf b/homeassistant-supervised/etc/systemd/system/systemd-journal-gatewayd.socket.d/10-hassio-supervisor.conf new file mode 100644 index 0000000..2674ad6 --- /dev/null +++ b/homeassistant-supervised/etc/systemd/system/systemd-journal-gatewayd.socket.d/10-hassio-supervisor.conf @@ -0,0 +1,3 @@ +[Socket] +ListenStream= +ListenStream=/run/systemd-journal-gatewayd.sock diff --git a/homeassistant-supervised/usr/lib/systemd/system/systemd-journal-gatewayd.socket b/homeassistant-supervised/usr/lib/systemd/system/systemd-journal-gatewayd.socket deleted file mode 100644 index a48e519..0000000 --- a/homeassistant-supervised/usr/lib/systemd/system/systemd-journal-gatewayd.socket +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -[Unit] -Description=Journal Gateway Service Socket -Documentation=man:systemd-journal-gatewayd(8) - -[Socket] -ListenStream=/run/systemd-journal-gatewayd.sock - -[Install] -WantedBy=sockets.target \ No newline at end of file