feat: rebranded from vpn-router to linux-manager.
This commit is contained in:
1 parent
8efe21bfa6
commit
85a1ffa21f
238 files changed
+5010
-3761
No files matched your search
+16
-10
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Example: unattended install and configuration of vpn-router on an existing
|
||||
# Example: unattended install and configuration of linux-manager on an existing
|
||||
# host. Run as root. Adjust the values below, or set them in the environment.
|
||||
#
|
||||
# This is the same end state as the cloud-init example and as configuring the
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
DEB="${DEB:-./vpn-router_1.0.0-1_all.deb}"
|
||||
DEB="${DEB:-./linux-manager_1.0.0-1_all.deb}"
|
||||
|
||||
# List values are JSON arrays.
|
||||
PLATFORM="${PLATFORM:-generic}"
|
||||
@@ -26,22 +26,28 @@ REMOTE_CIDRS="${REMOTE_CIDRS:-[\"192.168.0.0/24\"]}"
|
||||
PSK="${PSK:-change-me}"
|
||||
P2S_ENABLED="${P2S_ENABLED:-false}"
|
||||
P2S_ADDRESS_POOL="${P2S_ADDRESS_POOL:-172.16.0.0/24}"
|
||||
PKI_ROOT_NAME="${PKI_ROOT_NAME:-VPN Router Root CA}"
|
||||
PKI_ROOT_NAME="${PKI_ROOT_NAME:-Linux Manager Root CA}"
|
||||
WG_ENABLED="${WG_ENABLED:-false}"
|
||||
WG_ADDRESS="${WG_ADDRESS:-}"
|
||||
WG_LISTEN_PORT="${WG_LISTEN_PORT:-51820}"
|
||||
|
||||
# Write the configuration before installing, so postinst leaves it alone. The
|
||||
# pre-shared key goes to its own file, so it needs no JSON escaping.
|
||||
install -d -m 0755 /etc/vpn-router
|
||||
install -d -m 0755 /etc/linux-manager
|
||||
umask 077
|
||||
printf %s "$PSK" > /etc/vpn-router/psk
|
||||
cat > /etc/vpn-router/vpn-router.json <<EOF
|
||||
printf %s "$PSK" > /etc/linux-manager/psk
|
||||
cat > /etc/linux-manager/linux-manager.json <<EOF
|
||||
{
|
||||
"general": {
|
||||
"platform": "${PLATFORM}",
|
||||
"mode": "${MODE}"
|
||||
},
|
||||
"router": {
|
||||
"enabled": true
|
||||
},
|
||||
"vpn": {
|
||||
"enabled": true
|
||||
},
|
||||
"interfaces": {
|
||||
"external": "${EXTERNAL_INTERFACE}",
|
||||
"internal": "${INTERNAL_INTERFACE}"
|
||||
@@ -61,7 +67,7 @@ cat > /etc/vpn-router/vpn-router.json <<EOF
|
||||
"cidrs": ${REMOTE_CIDRS},
|
||||
"local_cidrs": ${LOCAL_CIDRS},
|
||||
"local_id_mode": "${LOCAL_ID_MODE}",
|
||||
"psk_file": "/etc/vpn-router/psk"
|
||||
"psk_file": "/etc/linux-manager/psk"
|
||||
}
|
||||
},
|
||||
"p2s": {
|
||||
@@ -82,7 +88,7 @@ umask 022
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y "$DEB"
|
||||
|
||||
# Installing starts vpn-router-setup, which applies the file above. Restart it
|
||||
# Installing starts linux-manager-setup, which applies the file above. Restart it
|
||||
# explicitly after any later edit.
|
||||
systemctl restart vpn-router-setup
|
||||
systemctl --no-pager status vpn-router-setup
|
||||
systemctl restart linux-manager-setup
|
||||
systemctl --no-pager status linux-manager-setup
|
||||
Reference in new issue
Block a user