summaryrefslogtreecommitdiff
path: root/ci/docker/starteduvpn.sh
blob: cddf88c5e7598d1fd8e5862036b8a673da40c8a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/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

vpn-daemon &
sleep 5

vpn-maint-apply-changes

sudo -u apache vpn-user-portal-account --add "${PORTAL_USER}" --password "${PORTAL_PASS}"

sleep infinity