github.com/hustcat/docker@v1.3.3-0.20160314103604-901c67a8eeab/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="${DOCKER_BINARY:-/usr/bin/docker}" 6 pidfile="${DOCKER_PIDFILE:-/run/${RC_SVCNAME}.pid}" 7 command_args="daemon -p \"${pidfile}\" ${DOCKER_OPTS}" 8 DOCKER_LOGFILE="${DOCKER_LOGFILE:-/var/log/${RC_SVCNAME}.log}" 9 start_stop_daemon_args="--background \ 10 --stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\"" 11 12 start_pre() { 13 checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE" 14 15 ulimit -n 1048576 16 ulimit -u 1048576 17 18 return 0 19 }