diff options
Diffstat (limited to 'ci/docker/starteduvpn.sh')
| -rw-r--r-- | ci/docker/starteduvpn.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ci/docker/starteduvpn.sh b/ci/docker/starteduvpn.sh index 191ef79..cddf88c 100644 --- a/ci/docker/starteduvpn.sh +++ b/ci/docker/starteduvpn.sh @@ -1,5 +1,15 @@ #!/usr/bin/env bash +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 + systemctl start php-fpm systemctl start httpd systemctl start crond @@ -9,9 +19,6 @@ sleep 5 vpn-maint-apply-changes -USER_NAME="docker" -USER_PASS="docker" - -sudo -u apache vpn-user-portal-account --add "${USER_NAME}" --password "${USER_PASS}" +sudo -u apache vpn-user-portal-account --add "${PORTAL_USER}" --password "${PORTAL_PASS}" sleep infinity |
