diff options
Diffstat (limited to 'community/docker/docker.initd')
-rw-r--r-- | community/docker/docker.initd | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/community/docker/docker.initd b/community/docker/docker.initd index 44c59d7c75b..a6ed89064c9 100644 --- a/community/docker/docker.initd +++ b/community/docker/docker.initd @@ -7,10 +7,23 @@ description_reload="Reload configuration without exiting" command="${DOCKERD_BINARY:-/usr/bin/dockerd}" command_args="${DOCKER_OPTS}" + DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}" DOCKER_ERRFILE="${DOCKER_ERRFILE:-${DOCKER_LOGFILE}}" DOCKER_OUTFILE="${DOCKER_OUTFILE:-${DOCKER_LOGFILE}}" -supervise_daemon_args="--stderr \"${DOCKER_ERRFILE}\" --stdout \"${DOCKER_OUTFILE}\"" +if [ "$DOCKER_ERRFILE" = "$DOCKER_OUTFILE" ]; then + LOGPROXY_OPTS="$LOGPROXY_OPTS -m" +fi +export \ + LOGPROXY_CHMOD="${LOGPROXY_CHMOD:-0644}" \ + LOGPROXY_LOG_DIRECTORY="${LOGPROXY_LOG_DIRECTORY:-/var/log}" \ + LOGPROXY_ROTATION_SIZE="${LOGPROXY_ROTATION_SIZE:-104857600}" \ + LOGPROXY_ROTATION_TIME="${LOGPROXY_ROTATION_TIME:-86400}" \ + LOGPROXY_ROTATION_SUFFIX="${LOGPROXY_ROTATION_SUFFIX:-.%Y%m%d%H%M%S}" \ + LOGPROXY_ROTATED_FILES="${LOGPROXY_ROTATE_FILES:-5}" + +output_logger="log_proxy $LOGPROXY_OPTS $DOCKER_OUTFILE" +error_logger="log_proxy $LOGPROXY_OPTS $DOCKER_ERRFILE" extra_started_commands="reload" @@ -18,9 +31,13 @@ rc_ulimit="${DOCKER_ULIMIT:--c unlimited -n 1048576 -u unlimited}" retry="${DOCKER_RETRY:-TERM/60/KILL/10}" +if [ -e /etc/profile.d/proxy.sh ]; then + . /etc/profile.d/proxy.sh +fi + depend() { - need sysfs cgroups - after iptables ip6tables + need sysfs cgroups net + after firewall } start_pre() { |