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:
Kostas Lekkas 2016-02-29 08:28:43 +02:00
commit ac0e510416
2 changed files with 19 additions and 1 deletions

View File

@ -83,5 +83,6 @@ COPY config/services/ /etc/systemd/system/
COPY resin-vars vpn-init /usr/src/app/
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

View File

@ -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