23 lines
515 B
Bash
23 lines
515 B
Bash
#!/bin/bash
|
|
|
|
if [ "$(id -u)" != "0" ]; then
|
|
echo -e "\033[31mThis script requires superuser rights.\033[0m"
|
|
exit 0
|
|
fi
|
|
|
|
trap 'echo -e "\033[31minstall.sh: Something went wrong\033[0m"; exit 1' ERR
|
|
set -e
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
SECRETS_PATH=/data/secrets/$SERVER_DOMAIN/$SERVER_DOMAIN.env
|
|
source $SECRETS_PATH
|
|
|
|
echo "Install traefik..."
|
|
cd /data/utils
|
|
bash global-env.sh TRAEFIK_LOG_LEVEL $TRAEFIKLOGLEVEL
|
|
cd /data/traefik
|
|
sudo docker compose up -d
|
|
|
|
trap - ERR
|
|
echo "Install traefik complete" |