Refactor: Use heredoc when creating env files and creds/other (#15469)

* Use heredoc

* Fixes
This commit is contained in:
Slaviša Arežina
2026-06-30 13:01:18 +02:00
committed by GitHub
parent 02bbb774c9
commit 4d56173394
65 changed files with 418 additions and 424 deletions
+12 -12
View File
@@ -15,10 +15,10 @@ update_os
msg_info "Installing Dependencies (Patience)"
$STD apt install -y \
build-essential \
redis-server \
expect \
ca-certificates
build-essential \
redis-server \
expect \
ca-certificates
msg_ok "Installed Dependencies"
setup_mongodb
@@ -31,14 +31,14 @@ NODEBB_USER="nodebb"
NODEBB_PWD="$(openssl rand -base64 18 | cut -c1-13)"
MONGO_CONNECTION_STRING="mongodb://${NODEBB_USER}:${NODEBB_PWD}@localhost:27017/nodebb"
NODEBB_SECRET=$(uuidgen)
{
echo "NodeBB-Credentials"
echo "Mongo Database User: $MONGO_ADMIN_USER"
echo "Mongo Database Password: $MONGO_ADMIN_PWD"
echo "NodeBB User: $NODEBB_USER"
echo "NodeBB Password: $NODEBB_PWD"
echo "NodeBB Secret: $NODEBB_SECRET"
} >>~/nodebb.creds
cat <<EOF >~/nodebb.creds
NodeBB-Credentials
Mongo Database User: $MONGO_ADMIN_USER
Mongo Database Password: $MONGO_ADMIN_PWD
NodeBB User: $NODEBB_USER
NodeBB Password: $NODEBB_PWD
NodeBB Secret: $NODEBB_SECRET
EOF
$STD mongosh <<EOF
use admin