mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 02:51:55 +00:00
fix docker pidfile, may resolve #44
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
ae984a50a1
commit
5d6f234057
@ -12,6 +12,8 @@ start()
|
|||||||
|
|
||||||
command="${DOCKER_BINARY:-/usr/bin/docker}"
|
command="${DOCKER_BINARY:-/usr/bin/docker}"
|
||||||
|
|
||||||
|
pidfile="/run/docker.pid"
|
||||||
|
|
||||||
# Start with networking on both Mac and Hyper-V, but in
|
# Start with networking on both Mac and Hyper-V, but in
|
||||||
# future change this to use a hypervisor socket.
|
# future change this to use a hypervisor socket.
|
||||||
DOCKER_OPTS="${DOCKER_OPTS} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
|
DOCKER_OPTS="${DOCKER_OPTS} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
|
||||||
@ -28,19 +30,15 @@ start()
|
|||||||
[ -d /Mac/$d ] && mkdir -p /$d && mount --bind /Mac/$d /$d
|
[ -d /Mac/$d ] && mkdir -p /$d && mount --bind /Mac/$d /$d
|
||||||
done
|
done
|
||||||
|
|
||||||
command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}"
|
|
||||||
|
|
||||||
DOCKER_LOGFILE="/var/log/docker.log"
|
DOCKER_LOGFILE="/var/log/docker.log"
|
||||||
|
|
||||||
pidfile="/run/docker.pid"
|
|
||||||
|
|
||||||
start-stop-daemon --start --quiet \
|
start-stop-daemon --start --quiet \
|
||||||
--background \
|
--background \
|
||||||
--exec ${command} \
|
--exec ${command} \
|
||||||
--pidfile ${pidfile} \
|
--pidfile ${pidfile} \
|
||||||
--stderr "${DOCKER_LOGFILE}" \
|
--stderr "${DOCKER_LOGFILE}" \
|
||||||
--stdout "${DOCKER_LOGFILE}" \
|
--stdout "${DOCKER_LOGFILE}" \
|
||||||
-- ${command_args}
|
-- daemon --pidfile=${pidfile} ${DOCKER_OPTS}
|
||||||
}
|
}
|
||||||
|
|
||||||
stop()
|
stop()
|
||||||
@ -51,6 +49,7 @@ stop()
|
|||||||
start-stop-daemon --stop --quiet --pidfile ${pidfile}
|
start-stop-daemon --stop --quiet --pidfile ${pidfile}
|
||||||
|
|
||||||
# taken from localmount stop script
|
# taken from localmount stop script
|
||||||
|
# XXX fix more cleanly see #35
|
||||||
|
|
||||||
yesno $RC_GOINGDOWN || return 0
|
yesno $RC_GOINGDOWN || return 0
|
||||||
# We never unmount / or /dev or $RC_SVCDIR
|
# We never unmount / or /dev or $RC_SVCDIR
|
||||||
|
Loading…
Reference in New Issue
Block a user