github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/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  depend() {
    21  	need containerd
    22  }
    23  
    24  start_pre() {
    25  	checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
    26  }
    27  
    28  reload() {
    29  	ebegin "Reloading ${RC_SVCNAME}"
    30  	start-stop-daemon --signal HUP --pidfile "${pidfile}"
    31  	eend $? "Failed to stop ${RC_SVCNAME}"
    32  }