Compare commits
3 Commits
wireguard-
...
v3.21.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f569998c93 | ||
|
|
9877366c51 | ||
|
|
61066e3896 |
@@ -156,8 +156,8 @@ ENTRYPOINT ["/entrypoint"]
|
||||
EXPOSE 8000/tcp 8888/tcp 8388/tcp 8388/udp
|
||||
HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=1 CMD /entrypoint healthcheck
|
||||
ARG TARGETPLATFORM
|
||||
RUN apk add --no-cache --update -X "https://dl-cdn.alpinelinux.org/alpine/v3.12/main" openvpn==2.4.11-r0 && \
|
||||
if [ "${TARGETPLATFORM}" != "linux/ppc64le" ]; then apk add --no-cache --update apk-tools==2.12.6-r0; fi && \
|
||||
RUN apk add --no-cache --update -l apk-tools && \
|
||||
apk add --no-cache --update -X "https://dl-cdn.alpinelinux.org/alpine/v3.12/main" openvpn==2.4.11-r0 && \
|
||||
mv /usr/sbin/openvpn /usr/sbin/openvpn2.4 && \
|
||||
apk del openvpn && \
|
||||
apk add --no-cache --update openvpn ca-certificates iptables ip6tables unbound tzdata && \
|
||||
|
||||
@@ -37,6 +37,7 @@ func (s *State) ApplyStatus(ctx context.Context, status models.LoopStatus) (
|
||||
switch existingStatus {
|
||||
case constants.Stopped, constants.Completed:
|
||||
default:
|
||||
s.statusMu.Unlock()
|
||||
return "already " + existingStatus.String(), nil
|
||||
}
|
||||
|
||||
@@ -55,6 +56,7 @@ func (s *State) ApplyStatus(ctx context.Context, status models.LoopStatus) (
|
||||
return newStatus.String(), nil
|
||||
case constants.Stopped:
|
||||
if existingStatus != constants.Running {
|
||||
s.statusMu.Unlock()
|
||||
return "already " + existingStatus.String(), nil
|
||||
}
|
||||
|
||||
@@ -73,6 +75,7 @@ func (s *State) ApplyStatus(ctx context.Context, status models.LoopStatus) (
|
||||
|
||||
return newStatus.String(), nil
|
||||
default:
|
||||
s.statusMu.Unlock()
|
||||
return "", fmt.Errorf("%w: %s: it can only be one of: %s, %s",
|
||||
ErrInvalidStatus, status, constants.Running, constants.Stopped)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user