mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-25 05:19:59 +00:00
Merge pull request #99 from lekkas/add-resin-supervisor-host-socket-service
Add resin-supervisor-host-socket.service for webterminal
This commit is contained in:
commit
ac0e510416
@ -83,5 +83,6 @@ COPY config/services/ /etc/systemd/system/
|
|||||||
COPY resin-vars vpn-init /usr/src/app/
|
COPY resin-vars vpn-init /usr/src/app/
|
||||||
|
|
||||||
RUN systemctl enable resin-supervisor-dind
|
RUN systemctl enable resin-supervisor-dind
|
||||||
|
RUN systemctl enable resin-supervisor-host-socket
|
||||||
|
|
||||||
CMD env > /etc/docker.env; exec /sbin/init
|
CMD env > /etc/docker.env; exec /sbin/init
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Host socket for resin supervisor
|
||||||
|
Requires=resin-supervisor.service
|
||||||
|
After=resin-supervisor.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=always
|
||||||
|
ExecStartPre=-/bin/rm -f /resin-data/resin-supervisor/host
|
||||||
|
ExecStart=/bin/bash -c ' \
|
||||||
|
while true; do \
|
||||||
|
rm -f /resin-data/resin-supervisor/host; \
|
||||||
|
socat UNIX-LISTEN:/resin-data/resin-supervisor/host EXEC:/bin/bash,pty,setsid,setpgid,stderr,ctty; \
|
||||||
|
done'
|
||||||
|
ExecStopPost=-/bin/rm -f /resin-data/resin-supervisor/host
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user