mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-05-08 17:26:54 +00:00
Using 23a432c2-537a-4291-bcb5-d62504644739 as the GUID (randomly generated). The Windows host side will uses this as service ID, once written. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
43 lines
801 B
Plaintext
Executable File
43 lines
801 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
description="vsock socket proxy client"
|
|
|
|
depend()
|
|
{
|
|
before docker
|
|
}
|
|
|
|
start()
|
|
{
|
|
ebegin "Starting docker socket vsock passthrough"
|
|
|
|
if [ -d /sys/bus/vmbus ]; then
|
|
PORT=23a432c2-537a-4291-bcb5-d62504644739
|
|
else
|
|
PORT=2376
|
|
fi
|
|
|
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/vsudd.pid
|
|
[ -n "${LOGFILE}" ] || LOGFILE=/var/log/vsudd.log
|
|
|
|
start-stop-daemon --start --quiet \
|
|
--background \
|
|
--exec /sbin/vsudd \
|
|
--make-pidfile --pidfile ${PIDFILE} \
|
|
--stderr "${LOGFILE}" --stdout "${LOGFILE}" \
|
|
-- -port "${PORT}" -sock /var/run/docker.sock
|
|
|
|
eend $? "Failed to start vsudd"
|
|
}
|
|
|
|
stop()
|
|
{
|
|
ebegin "Stopping docker socket passthrough"
|
|
|
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/vsudd.pid
|
|
|
|
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
|
|
|
|
eend $? "Failed to stop vsudd"
|
|
}
|