linux - copy current variables.env to make temp one

This commit is contained in:
bunkerity 2022-08-16 09:35:27 +02:00
parent 8e15e2a400
commit 0580662cc8
No known key found for this signature in database
GPG key ID: 3D80806F12602A7C

View file

@ -35,14 +35,15 @@ function start() {
# STEP1 #
# Generate variables.env files to /tmp/ #
#############################################
log "ENTRYPOINT" "" "Generate variables.env files to /tmp/ ..."
printf "HTTP_PORT=80\nSERVER_NAME=example.com\nTEMP_NGINX=yes" > "/tmp/variables.env"
result=$?
log "ENTRYPOINT" "" "Generate variables.env files to /tmp ..."
cp /opt/bunkerweb/variables.env /tmp/variables.env
result=$?
if [ $result -ne 0 ];
then
log "ENTRYPOINT" "❌" "Your command exited with non-zero status $result"
exit 1
fi
log "ENTRYPOINT" "❌" "Your command exited with non-zero status $result"
exit 1
fi
printf "\nTEMP_NGINX=yes" >> /tmp/variables.env
#############################################
# STEP2 #