| 1 | #!/sbin/openrc-run |
| 2 | |
| 3 | name="Docker registry authentication server" |
| 4 | |
| 5 | command="/usr/bin/docker-auth" |
| 6 | # Without `-logtostderr=true` the daemon litters /tmp with logfiles |
| 7 | command_args="-logtostderr=true $cfgfile" |
| 8 | command_background="yes" |
| 9 | logfile="/var/log/${RC_SVCNAME}.log" |
| 10 | error_log="$logfile" |
| 11 | output_log="$logfile" |
| 12 | pidfile="/run/${RC_SVCNAME}.pid" |
| 13 | |
| 14 | required_files="$cfgfile" |
| 15 | |
| 16 | start_pre() { |
| 17 | if [ "$logfile" ]; then |
| 18 | checkpath -f -m 0644 -o "$command_user" "$logfile" || return 1 |
| 19 | fi |
| 20 | } |