Adjusting upgrade on file variables.env

This commit is contained in:
AxyFr 2023-02-14 11:14:45 +01:00
parent 79dabf7638
commit b75bc0344b
2 changed files with 3 additions and 1 deletions

View File

@ -34,11 +34,13 @@ function start() {
/usr/share/bunkerweb/helpers/data.sh "ENTRYPOINT"
# Init database
if [ ! -f /etc/bunkerweb/variables.env ]; then
echo -e "IS_LOADING=yes\nSERVER_NAME=\nAPI_HTTP_PORT=${API_HTTP_PORT:-7000}\nAPI_SERVER_NAME=${API_SERVER_NAME:-bwapi}\nAPI_WHITELIST_IP=${API_WHITELIST_IP:-127.0.0.0/8}" > /etc/bunkerweb/variables.env
/usr/share/bunkerweb/gen/save_config.py --variables /etc/bunkerweb/variables.env --init
if [ "$?" -ne 0 ] ; then
log "ENTRYPOINT" "❌" "Scheduler generator failed"
exit 1
fi
fi
# Execute jobs

View File

@ -18,4 +18,4 @@ RUN sudo dnf install nginx-1.20.2 -y && sudo dnf install epel-release -y
VOLUME [/sys/fs/cgroup]
CMD ["/usr/sbin/init"]
CMD ["/usr/sbin/init"]