aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker-registry/docker-registry.initd
blob: 47064077eda93833d7483c74f6a5cf1d4efda55d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/sbin/openrc-run
# $Header: $

DOCKER_REGISTRY_PIDFILE=${DOCKER_REGISTRY_PIDFILE:-/run/${SVCNAME}.pid}
DOCKER_REGISTRY_BINARY=${DOCKER_REGISTRY_BINARY:-/usr/bin/docker-registry}
DOCKER_REGISTRY_CONFIG=${DOCKER_REGISTRY_CONFIG:-/etc/docker-registry/config.yml}
DOCKER_REGISTRY_LOGFILE=${DOCKER_REGISTRY_LOGFILE:-/var/log/docker-registry.log}

command="$DOCKER_REGISTRY_BINARY"
command_args="$DOCKER_REGISTRY_CONFIG"
pidfile="$DOCKER_REGISTRY_PIDFILE"
command_background="true"
start_stop_daemon_args="--user docker-registry:docker-registry --stdout $DOCKER_REGISTRY_LOGFILE --stderr $DOCKER_REGISTRY_LOGFILE"
name="Docker Registry"

start_pre() {
	checkpath --directory --owner docker-registry:docker-registry --mode 0770 /var/lib/registry

	checkpath -f -m 0644 -o docker-registry:docker-registry "$DOCKER_REGISTRY_LOGFILE"
}