summaryrefslogtreecommitdiff
path: root/ci/docker/starteduvpn.sh
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-11-21 15:52:07 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2024-11-21 15:52:07 +0100
commit72edbfe5d2d51b7dbaaa6ac6fe96cfbd43b60069 (patch)
tree739b96fa5d01aab5b5fc61426aaf7f503b512531 /ci/docker/starteduvpn.sh
parent09e8aaddfcb5d2463279e58c3c6c320d1cb2fb46 (diff)
Remove old Docker CI
Diffstat (limited to 'ci/docker/starteduvpn.sh')
-rwxr-xr-xci/docker/starteduvpn.sh62
1 files changed, 0 insertions, 62 deletions
diff --git a/ci/docker/starteduvpn.sh b/ci/docker/starteduvpn.sh
deleted file mode 100755
index fab2d2d..0000000
--- a/ci/docker/starteduvpn.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env bash
-
-# Check if credentials are set
-# If not fail with exit code 1
-if [[ -z "${PORTAL_USER}" ]]; then
- printf "Error: No portal username set, set the PORTAL_USER env var\n"
- exit 1
-fi
-
-if [[ -z "${PORTAL_PASS}" ]]; then
- printf "Error: No portal username set, set the PORTAL_PASS env var\n"
- exit 1
-fi
-
-# Replace expiry
-./replaceexpiry.sh /etc/vpn-user-portal/config.php
-
-# Start the preliminary services
-mkdir /run/php-fpm
-php-fpm --nodaemonize &
-crond &
-httpd -DFOREGROUND &
-
-# Start the daemon in the background and get the PID
-vpn-daemon &
-pid_daemon=$!
-
-# Wait a bit
-sleep 5
-
-# Snippet from vpn-maint-apply-changes
-# Enable & Start WireGuard
-rm -rf /etc/wireguard/*
-if ! /usr/libexec/vpn-server-node/server-config; then
- exit 1
-fi
-for F in /etc/wireguard/*.conf
-do
- case ${F} in
- *.conf)
- CONFIG_NAME=$(basename "${F}" .conf)
- wg-quick up "${CONFIG_NAME}"
- ;;
- esac
-done
-# sync with vpn-daemon, no need to wait for the cron, but *ONLY* do this when
-# this is a machine with vpn-user-portal installed
-if [ -d /etc/vpn-user-portal ]; then
- if [ -f /etc/redhat-release ]; then
- sudo -u apache /usr/libexec/vpn-user-portal/daemon-sync
- fi
- if [ -f /etc/debian_version ]; then
- sudo -u www-data /usr/libexec/vpn-user-portal/daemon-sync
- fi
-fi
-
-
-# Add the user with the env variables
-sudo -u apache vpn-user-portal-account --add "${PORTAL_USER}" --password "${PORTAL_PASS}"
-
-# Wait for the daemon to finish
-wait $pid_daemon