File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ if [[ ! -f /opt/run_homarr.sh ]]; then
4343 sed -i ' /^DB_DIALECT=/d' /opt/homarr/.env && echo " DB_DIALECT='sqlite'" >> /opt/homarr/.env
4444 cat << 'EOF ' >/opt/run_homarr.sh
4545#!/bin/bash
46+ set -a
47+ source /opt/homarr/.env
48+ set +a
4649export DB_DIALECT='sqlite'
4750export AUTH_SECRET=$(openssl rand -base64 32)
4851node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
8588 msg_ok " Backup Data"
8689
8790 msg_info " Updating and rebuilding ${APP} to v${RELEASE} (Patience)"
91+ rm /opt/run_homarr.sh
92+ cat << 'EOF ' >/opt/run_homarr.sh
93+ #!/bin/bash
94+ set -a
95+ source /opt/homarr/.env
96+ set +a
97+ export DB_DIALECT='sqlite'
98+ export AUTH_SECRET=$(openssl rand -base64 32)
99+ node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
100+ export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+')
101+ envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf
102+ nginx -g 'daemon off;' &
103+ redis-server /opt/homarr/packages/redis/redis.conf &
104+ node apps/tasks/tasks.cjs &
105+ node apps/websocket/wssServer.cjs &
106+ node apps/nextjs/server.js & PID=$!
107+ wait $PID
108+ EOF
109+ chmod +x /opt/run_homarr.sh
88110 wget -q " https://github.com/homarr-labs/homarr/archive/refs/tags/v${RELEASE} .zip"
89111 unzip -q v${RELEASE} .zip
90112 rm -rf v${RELEASE} .zip
Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ msg_ok "Finished copying"
8686msg_info " Creating Services"
8787cat << 'EOF ' >/opt/run_homarr.sh
8888#!/bin/bash
89+ set -a
90+ source /opt/homarr/.env
91+ set +a
8992export DB_DIALECT='sqlite'
9093export AUTH_SECRET=$(openssl rand -base64 32)
9194node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
You can’t perform that action at this time.
0 commit comments