Changeset f99bbe8 in Klonkt for scripts/install.sh
- Timestamp:
- 06/23/2026 10:00:00 PM (3 months ago)
- Branches:
- main
- Children:
- 5eef817
- Parents:
- 09ee2bd
- File:
-
- 1 edited
-
scripts/install.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scripts/install.sh
r09ee2bd rf99bbe8 160 160 echo "NODE_ENV=production" 161 161 echo "PORT=${KLONKT_PORT}" 162 # Bind to loopback only: Caddy (this host) reaches it; the internet cannot 163 # hit the app directly on its port, bypassing HTTPS. 164 echo "HOST=127.0.0.1" 162 165 echo "SESSION_SECRET=${SECRET}" 163 166 echo "DATABASE_PATH=./storage/database.sqlite" … … 168 171 } > "$ENV" 169 172 chown "$KLONKT_USER:$KLONKT_USER" "$ENV"; chmod 600 "$ENV" 170 ok "new .env (random SESSION_SECRET )"173 ok "new .env (random SESSION_SECRET, app bound to 127.0.0.1)" 171 174 else 172 175 # sync the port in an existing .env with the chosen port 173 176 if grep -q '^PORT=' "$ENV"; then sed -i "s/^PORT=.*/PORT=${KLONKT_PORT}/" "$ENV"; fi 174 ok "kept existing .env (port synced)" 177 # harden older installs: bind to loopback if not already configured 178 grep -q '^HOST=' "$ENV" || echo "HOST=127.0.0.1" >> "$ENV" 179 ok "kept existing .env (port synced, bound to 127.0.0.1)" 175 180 fi 176 181
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)