* Create systemd socket override for systemd-journal-gatewayd As stated in https://github.com/home-assistant/supervised-installer/issues/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
This commit is contained in:
parent
d135a92f6d
commit
d8af25272d
3 changed files with 11 additions and 18 deletions
|
@ -31,6 +31,14 @@ if [ "$(systemctl is-active systemd-resolved)" = 'inactive' ]; then
|
||||||
systemctl start systemd-resolved.service> /dev/null 2>&1;
|
systemctl start systemd-resolved.service> /dev/null 2>&1;
|
||||||
fi
|
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
|
# Enable and start systemd-journal-gatewayd
|
||||||
if [ "$(systemctl is-active systemd-journal-gatewayd.socket)" = 'inactive' ]; then
|
if [ "$(systemctl is-active systemd-journal-gatewayd.socket)" = 'inactive' ]; then
|
||||||
info "Enable systemd-journal-gatewayd"
|
info "Enable systemd-journal-gatewayd"
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
[Socket]
|
||||||
|
ListenStream=
|
||||||
|
ListenStream=/run/systemd-journal-gatewayd.sock
|
|
@ -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
|
|
Loading…
Reference in a new issue