forked from authelia/authelia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
43 lines (36 loc) · 929 Bytes
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
export PATH=$PATH:./cmd/authelia-scripts/:./.buildkite/steps/:./node_modules/.bin:/tmp
if [[ -z "$OLD_PS1" ]]; then
OLD_PS1="$PS1"
export PS1="(authelia) $PS1"
fi
if [[ $(id -u) = 0 ]]; then
echo "Cannot run as root, defaulting to UID 1000"
export USER_ID=1000
elif [[ $(uname) == "Darwin" ]]; then
echo "Normalise for OSX, defaulting to UID 1000"
export USER_ID=1000
else
export USER_ID=$(id -u)
fi
if [[ $(id -g) = 0 ]]; then
echo "Cannot run as root, defaulting to GID 1000"
export GROUP_ID=1000
elif [[ $(uname) == "Darwin" ]]; then
echo "Normalise for OSX, defaulting to GID 1000"
export GROUP_ID=1000
else
export GROUP_ID=$(id -g)
fi
if [[ "$CI" == "true" ]]; then
true
else
export CI=false
fi
echo "[BOOTSTRAP] Checking if Go is installed..."
if [[ ! -x "$(command -v go)" ]];
then
echo "[ERROR] You must install Go on your machine.";
return
fi
authelia-scripts bootstrap