Skip to content

Commit

Permalink
Expose systemd-journal-gatewayd (#235)
Browse files Browse the repository at this point in the history
* Expose systemd-journal-gatewayd

* Enable and start systemd-journal-gatewayd.socket

* add systemd-journal-remote to requirements

* add systemd-journal-remote to requirements
  • Loading branch information
ikifar2012 authored Sep 15, 2022
1 parent 87c4f98 commit 8b0cfe7
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ curl \
udisks2 \
libglib2.0-bin \
network-manager \
dbus -y
dbus \
systemd-journal-remote -y
```

Step 2: Install Docker-CE with the following command:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant-supervised/DEBIAN/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Section: base
Version: 1.2.2
Priority: optional
Architecture: all
Depends: curl, bash, docker-ce, dbus, network-manager, apparmor, jq, systemd, os-agent
Depends: curl, bash, docker-ce, dbus, network-manager, apparmor, jq, systemd, os-agent, systemd-journal-remote
Maintainer: Matheson Steplock <https://mathesonsteplock.ca/>
Homepage: https://www.home-assistant.io/
Description: Home Assistant Supervised
Expand Down
7 changes: 7 additions & 0 deletions homeassistant-supervised/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ if [ "$(systemctl is-active systemd-resolved)" = 'inactive' ]; then
systemctl start systemd-resolved.service> /dev/null 2>&1;
fi

# Enable and start systemd-journal-gatewayd
if [ "$(systemctl is-active systemd-journal-gatewayd.socket)" = 'inactive' ]; then
info "Enable systemd-journal-gatewayd"
systemctl enable systemd-journal-gatewayd.socket> /dev/null 2>&1;
systemctl start systemd-journal-gatewayd.socket> /dev/null 2>&1;
fi

# Restart Docker service
info "Restarting docker service"
systemctl restart "${SERVICE_DOCKER}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[Unit]
Description=Hass.io supervisor
Requires=docker.service dbus.service
Wants=network-online.target hassio-apparmor.service time-sync.target
After=docker.service dbus.service network-online.target hassio-apparmor.service time-sync.target
Wants=network-online.target hassio-apparmor.service time-sync.target systemd-journal-gatewayd.socket
After=docker.service dbus.service network-online.target hassio-apparmor.service time-sync.target systemd-journal-gatewayd.socket
StartLimitIntervalSec=60
StartLimitBurst=5
ConditionPathExists=/run/dbus/system_bus_socket
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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
1 change: 1 addition & 0 deletions homeassistant-supervised/usr/sbin/hassio-supervisor
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ if [ -z "${SUPERVISOR_CONTAINER_ID}" ]; then
--name hassio_supervisor \
--privileged --security-opt apparmor="hassio-supervisor" \
-v /run/docker.sock:/run/docker.sock:rw \
-v /run/systemd-journal-gatewayd.sock:/run/systemd-journal-gatewayd.sock:rw \
-v /run/dbus:/run/dbus:ro \
-v /run/supervisor:/run/os:rw \
-v /run/udev:/run/udev:ro \
Expand Down

0 comments on commit 8b0cfe7

Please sign in to comment.