Set up environment variables for new directories
Ensure environment variables are set when creating directories.
This commit is contained in:
parent
a8be512859
commit
ffce06ae2a
@ -40,6 +40,8 @@ function update_script() {
|
||||
sed -i 's|^EnvironmentFile=.*|EnvironmentFile=/opt/tracktor.env|' /etc/systemd/system/tracktor.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
if [ ! -d "/opt/tracktor-data/uploads" ]; then
|
||||
mkdir -p /opt/tracktor-data/{uploads,logs}
|
||||
EXISTING_AUTH_PIN=$(grep '^AUTH_PIN=' /opt/tracktor.env 2>/dev/null | cut -d'=' -f2)
|
||||
AUTH_PIN=${EXISTING_AUTH_PIN:-123456}
|
||||
cat <<EOF >/opt/tracktor.env
|
||||
@ -60,6 +62,7 @@ AUTH_PIN=${AUTH_PIN}
|
||||
# PUBLIC_DEMO_MODE=false
|
||||
# FORCE_DATA_SEED=false
|
||||
EOF
|
||||
fi
|
||||
msg_ok "Corrected Services"
|
||||
|
||||
setup_nodejs
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user