feat(vpn): add version logging from VERSION file
- Read version from /etc/wireguard/VERSION instead of hardcoding - Copy VERSION file into container image during build - Update VERSION to v1.1.0
This commit is contained in:
@@ -13,7 +13,8 @@ RUN apk add --no-cache \
|
|||||||
# Create wireguard config directory (config is mounted at runtime)
|
# Create wireguard config directory (config is mounted at runtime)
|
||||||
RUN mkdir -p /etc/wireguard
|
RUN mkdir -p /etc/wireguard
|
||||||
|
|
||||||
# Copy entrypoint
|
# Copy version file and entrypoint
|
||||||
|
COPY VERSION /etc/wireguard/VERSION
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v0.1.0
|
v1.1.0
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
VERSION_FILE="/etc/wireguard/VERSION"
|
||||||
|
if [ -f "$VERSION_FILE" ]; then
|
||||||
|
VERSION=$(cat "$VERSION_FILE")
|
||||||
|
else
|
||||||
|
VERSION="unknown"
|
||||||
|
fi
|
||||||
|
echo "[init] VPN Container Entrypoint ${VERSION}"
|
||||||
|
|
||||||
INTERFACE="wg0"
|
INTERFACE="wg0"
|
||||||
MOUNT_CONFIG="/etc/wireguard/${INTERFACE}.conf"
|
MOUNT_CONFIG="/etc/wireguard/${INTERFACE}.conf"
|
||||||
CONFIG_DIR="/run/wireguard"
|
CONFIG_DIR="/run/wireguard"
|
||||||
|
|||||||
Reference in New Issue
Block a user