github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/contrib/init/openrc/docker.initd (about)

     1  #!/sbin/openrc-run
     2  # Copyright 1999-2013 Gentoo Foundation
     3  # Distributed under the terms of the GNU General Public License v2
     4  
     5  command="${DOCKERD_BINARY:-/usr/bin/dockerd}"
     6  pidfile="${DOCKER_PIDFILE:-/run/${RC_SVCNAME}.pid}"
     7  command_args="-p \"${pidfile}\" ${DOCKER_OPTS}"
     8  DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}"
     9  DOCKER_ERRFILE="${DOCKER_ERRFILE:-${DOCKER_LOGFILE}}"
    10  DOCKER_OUTFILE="${DOCKER_OUTFILE:-${DOCKER_LOGFILE}}"
    11  start_stop_daemon_args="--background \
    12  	--stderr \"${DOCKER_ERRFILE}\" --stdout \"${DOCKER_OUTFILE}\""
    13  
    14  extra_started_commands="reload"
    15  
    16  rc_ulimit="${DOCKER_ULIMIT:--c unlimited -n 1048576 -u unlimited}"
    17  
    18  retry="${DOCKER_RETRY:-TERM/60/KILL/10}"
    19  
    20  start_pre() {
    21  	checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
    22  }
    23  
    24  reload() {
    25  	ebegin "Reloading ${RC_SVCNAME}"
    26  	start-stop-daemon --signal HUP --pidfile "${pidfile}"
    27  	eend $? "Failed to stop ${RC_SVCNAME}"
    28  }