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