Files
linuxkit/alpine/packages/hostlog/etc/init.d/hostlog
Justin Cormack d054f4392d use driverDir not groupDir
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-02-18 11:19:52 +00:00

21 lines
386 B
Plaintext
Executable File

#!/sbin/openrc-run
depends()
{
before acpid docker syslog chronyd
after 9pinit transfused
}
start()
{
cat /proc/cmdline | grep -q 'com.docker.driverDir' || exit 0
ebegin "Redirecting logs to host"
DRIVERDIR="/Mac$(cat /proc/cmdline | sed -e 's/.*com.docker.driverDir="//' -e 's/".*//')"
mount --bind "${DRIVERDIR}/log" /var/log
eend $? "Failed to redirect logs to host"
}