mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
parent
4d981b3934
commit
9f904eb27e
16
bootstrap.sh
16
bootstrap.sh
|
@ -2,33 +2,39 @@
|
||||||
|
|
||||||
export PATH=$PATH:./cmd/authelia-scripts/:./node_modules/.bin:/tmp
|
export PATH=$PATH:./cmd/authelia-scripts/:./node_modules/.bin:/tmp
|
||||||
|
|
||||||
if [ -z "$OLD_PS1" ]; then
|
if [[ -z "$OLD_PS1" ]]; then
|
||||||
OLD_PS1="$PS1"
|
OLD_PS1="$PS1"
|
||||||
export PS1="(authelia) $PS1"
|
export PS1="(authelia) $PS1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $(id -u) = 0 ]; then
|
if [[ $(id -u) = 0 ]]; then
|
||||||
echo "Cannot run as root, defaulting to UID 1000"
|
echo "Cannot run as root, defaulting to UID 1000"
|
||||||
export USER_ID=1000
|
export USER_ID=1000
|
||||||
|
elif [[ $(uname) == "Darwin" ]]; then
|
||||||
|
echo "Normalise for OSX, defaulting to UID 1000"
|
||||||
|
export USER_ID=1000
|
||||||
else
|
else
|
||||||
export USER_ID=$(id -u)
|
export USER_ID=$(id -u)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $(id -g) = 0 ]; then
|
if [[ $(id -g) = 0 ]]; then
|
||||||
echo "Cannot run as root, defaulting to GID 1000"
|
echo "Cannot run as root, defaulting to GID 1000"
|
||||||
export GROUP_ID=1000
|
export GROUP_ID=1000
|
||||||
|
elif [[ $(uname) == "Darwin" ]]; then
|
||||||
|
echo "Normalise for OSX, defaulting to GID 1000"
|
||||||
|
export GROUP_ID=1000
|
||||||
else
|
else
|
||||||
export GROUP_ID=$(id -g)
|
export GROUP_ID=$(id -g)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CI" == "true" ]; then
|
if [[ "$CI" == "true" ]]; then
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
export CI=false
|
export CI=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[BOOTSTRAP] Checking if Go is installed..."
|
echo "[BOOTSTRAP] Checking if Go is installed..."
|
||||||
if [ ! -x "$(command -v go)" ];
|
if [[ ! -x "$(command -v go)" ]];
|
||||||
then
|
then
|
||||||
echo "[ERROR] You must install Go on your machine.";
|
echo "[ERROR] You must install Go on your machine.";
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user