blob: a800f2e9ccbc8452e40bcb18373eb7e72ba60fbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/sbin/openrc-run
# These awfully long uppercase variables are here only for backward
# compatibility. Do not use them!
: ${logfile:=${DOCKER_REGISTRY_LOGFILE:-"/var/log/docker-registry.log"}}
: ${conffile:=${DOCKER_REGISTRY_CONFIG:-"/etc/docker-registry/config.yml"}}
: ${user:="docker-registry"}
: ${group:="$user"}
name="Docker Registry"
command="/usr/bin/docker-registry"
command_args="serve $conffile"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
start_stop_daemon_args="
--user $user:$group
--stdout $logfile
--stderr $logfile"
required_files="$conffile"
start_pre() {
checkpath -d -m 0770 -o "$user:$group" /var/lib/registry
checkpath -f -m 0644 -o "$user:$group" "$logfile"
}
|