SIEMbitwardendnscrypthome assistantjellyfinjitsimulti-factor authenticationnextcloudonlyofficepiholeraspberry pirocket.chatsyncthingtorwazuhwireguard
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
602 B
31 lines
602 B
|
5 years ago
|
#!/bin/bash
|
||
|
|
|
||
|
|
set -e
|
||
|
|
|
||
|
|
SERVICE="$1"
|
||
|
|
|
||
|
|
export MISTBORN_HOME=/opt/mistborn
|
||
|
|
|
||
|
|
# read in global variables
|
||
|
|
set -a
|
||
|
|
source ${MISTBORN_HOME}/.env
|
||
|
|
set +a
|
||
|
|
|
||
|
|
export SERVICE_ENV_INSTALLER="${MISTBORN_HOME}/scripts/subinstallers/extra/${SERVICE}.sh"
|
||
|
|
export SERVICE_ENV_FILE="${MISTBORN_HOME}/.envs/.production/.${SERVICE}"
|
||
|
|
|
||
|
|
if [[ -f "${SERVICE_ENV_INSTALLER}" ]]; then
|
||
|
|
|
||
|
|
if [[ -f "${SERVICE_ENV_FILE}" ]]; then
|
||
|
|
echo "Environment file already exists."
|
||
|
|
else
|
||
|
|
echo "Creating environment file"
|
||
|
|
|
||
|
|
source $SERVICE_ENV_INSTALLER $SERVICE_ENV_FILE
|
||
|
|
|
||
|
|
fi
|
||
|
|
|
||
|
|
else
|
||
|
|
echo "No subinstaller found."
|
||
|
|
fi
|