From 4d561733948891d819218faa895a88981d540599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Tue, 30 Jun 2026 13:01:18 +0200 Subject: [PATCH] Refactor: Use heredoc when creating env files and creds/other (#15469) * Use heredoc * Fixes --- ct/patchmon.sh | 11 +++--- ct/wizarr.sh | 10 ++--- install/adventurelog-install.sh | 11 +++--- install/alpine-garage-install.sh | 12 +++--- install/alpine-ironclaw-install.sh | 8 ++-- install/alpine-rclone-install.sh | 10 ++--- install/alpine-rustdeskserver-install.sh | 12 +++--- install/alpine-valkey-install.sh | 13 +++--- install/anytype-server-install.sh | 2 +- install/apache-couchdb-install.sh | 10 ++--- install/apache-guacamole-install.sh | 14 +++---- install/autobrr-install.sh | 2 +- install/bookorbit-install.sh | 2 +- install/checkmk-install.sh | 12 +++--- install/crafty-controller-install.sh | 12 +++--- install/dolibarr-install.sh | 8 ++-- install/dotnetaspwebapi-install.sh | 10 ++--- install/duplicati-install.sh | 8 ++-- install/elementsynapse-install.sh | 12 +++--- install/erpnext-install.sh | 16 ++++---- install/frigate-install.sh | 4 +- install/garage-install.sh | 12 +++--- install/ghostfolio-install.sh | 12 +++--- install/glpi-install.sh | 12 +++--- install/graylog-install.sh | 10 ++--- install/healthchecks-install.sh | 24 ++++++------ install/hortusfox-install.sh | 12 +++--- install/immich-install.sh | 14 +++---- install/ironclaw-install.sh | 8 ++-- install/kimai-install.sh | 12 +++--- install/librenms-install.sh | 10 ++--- install/limesurvey-install.sh | 12 +++--- install/listmonk-install.sh | 12 +++--- install/livebook-install.sh | 8 ++-- install/managemydamnlife-install.sh | 12 +++--- install/mattermost-install.sh | 12 +++--- install/mediamanager-install.sh | 12 +++--- install/miniflux-install.sh | 8 ++-- install/netbox-install.sh | 12 +++--- install/nightscout-install.sh | 8 ++-- install/nodebb-install.sh | 24 ++++++------ install/odoo-install.sh | 12 +++--- install/onlyoffice-install.sh | 29 ++++++-------- install/paperclip-install.sh | 2 +- install/paperless-ngx-install.sh | 12 +++--- install/part-db-install.sh | 10 ++--- install/paymenter-install.sh | 20 +++++----- install/pihole-install.sh | 2 +- install/plane-install.sh | 48 +++++++++++------------ install/planka-install.sh | 28 ++++++------- install/pterodactyl-panel-install.sh | 24 ++++++------ install/radicale-install.sh | 10 ++--- install/rclone-install.sh | 10 ++--- install/splunk-enterprise-install.sh | 36 ++++++++--------- install/stirling-pdf-install.sh | 2 +- install/storyteller-install.sh | 10 ++--- install/tubearchivist-install.sh | 14 +++---- install/twingate-connector-install.sh | 14 +++---- install/valkey-install.sh | 50 ++++++++++++------------ install/warracker-install.sh | 16 ++++---- install/webtrees-install.sh | 2 +- install/yt-dlp-webui-install.sh | 10 ++--- install/zammad-install.sh | 2 +- install/zitadel-install.sh | 24 ++++++------ install/zot-registry-install.sh | 10 ++--- 65 files changed, 418 insertions(+), 424 deletions(-) diff --git a/ct/patchmon.sh b/ct/patchmon.sh index 9414c5a73..87fe75464 100644 --- a/ct/patchmon.sh +++ b/ct/patchmon.sh @@ -58,12 +58,11 @@ function update_script() { -e 's/^NODE_/APP_/' \ -e '/^SERVER_*/d' \ -e '/^# API*/,+2d' /opt/patchmon/.env - { - echo "" - echo "SESSION_SECRET=$(openssl rand -hex 64)" - echo "AI_ENCRYPTION_KEY=$(openssl rand -hex 64)" - echo "AGENT_BINARIES_DIR=/opt/patchmon/agents" - } >>/opt/patchmon/.env + cat </opt/patchmon/.env +SESSION_SECRET=$(openssl rand -hex 64) +AI_ENCRYPTION_KEY=$(openssl rand -hex 64) +AGENT_BINARIES_DIR=/opt/patchmon/agents +EOF sed -i -e '\|Directory|s|/backend||' \ -e 's|^ExecStart=.*|ExecStart=/opt/patchmon/patchmon-server|' \ -e 's|^Environment=NODE_.*|EnvironmentFile=/opt/patchmon/.env|' \ diff --git a/ct/wizarr.sh b/ct/wizarr.sh index 147dc6bf8..febc1e4c3 100644 --- a/ct/wizarr.sh +++ b/ct/wizarr.sh @@ -57,11 +57,11 @@ function update_script() { sed -i 's/--workers 4//' /opt/wizarr/start.sh fi if ! grep -qE 'FLASK|WORKERS|VERSION' /opt/wizarr/.env; then - { - echo "FLASK_ENV=production" - echo "GUNICORN_WORKERS=4" - echo "APP_VERSION=$(sed 's/^20/v&/' ~/.wizarr)" - } >>/opt/wizarr/.env + cat </opt/wizarr/.env +FLASK_ENV=production +GUNICORN_WORKERS=4 +APP_VERSION=$(sed 's/^20/v&/' ~/.wizarr) +EOF else sed -i "s/_VERSION=v.*$/_VERSION=v$(cat ~/.wizarr)/" /opt/wizarr/.env fi diff --git a/install/adventurelog-install.sh b/install/adventurelog-install.sh index a5eb73ec6..10e664bc6 100644 --- a/install/adventurelog-install.sh +++ b/install/adventurelog-install.sh @@ -86,12 +86,11 @@ user.is_superuser = True user.is_staff = True user.save() EOF -{ - echo "" - echo "Django-Credentials" - echo "Django Admin User: $DJANGO_ADMIN_USER" - echo "Django Admin Password: $DJANGO_ADMIN_PASS" -} >>~/adventurelog.creds +cat <~/adventurelog.creds +Django-Credentials +Django Admin User: $DJANGO_ADMIN_USER +Django Admin Password: $DJANGO_ADMIN_PASS +EOF msg_ok "Setup Django Admin" msg_info "Creating Service" diff --git a/install/alpine-garage-install.sh b/install/alpine-garage-install.sh index 461617e95..476f98dd7 100644 --- a/install/alpine-garage-install.sh +++ b/install/alpine-garage-install.sh @@ -25,12 +25,12 @@ mkdir -p /etc/garage RPC_SECRET=$(openssl rand -hex 64 | cut -c1-64) ADMIN_TOKEN=$(openssl rand -base64 32) METRICS_TOKEN=$(openssl rand -base64 32) -{ - echo "Garage Tokens and Secrets" - echo "RPC Secret: $RPC_SECRET" - echo "Admin Token: $ADMIN_TOKEN" - echo "Metrics Token: $METRICS_TOKEN" -} >~/garage.creds +cat <~/garage.creds +Garage Tokens and Secrets +RPC Secret: $RPC_SECRET +Admin Token: $ADMIN_TOKEN +Metrics Token: $METRICS_TOKEN +EOF echo $GITEA_RELEASE >>~/.garage cat </etc/garage.toml metadata_dir = "/var/lib/garage/meta" diff --git a/install/alpine-ironclaw-install.sh b/install/alpine-ironclaw-install.sh index 0a842a07b..315c82336 100644 --- a/install/alpine-ironclaw-install.sh +++ b/install/alpine-ironclaw-install.sh @@ -38,10 +38,10 @@ chmod +x /usr/local/bin/ironclaw msg_info "Configuring Environment" GATEWAY_TOKEN=$(openssl rand -hex 32) mkdir -p /root/.ironclaw -{ - echo "Gateway-Token" - echo "Token: $GATEWAY_TOKEN" -} >> /root/.ironclaw/gateway.creds +cat </root/.ironclaw/gateway.creds +Gateway-Token +Token: $GATEWAY_TOKEN +EOF mkdir -p /root/.ironclaw cat </root/.ironclaw/.env diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index bff112d6c..40b345763 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -27,11 +27,11 @@ $STD unzip -j "$temp_file" '*/**' -d /opt/rclone cd /opt/rclone RCLONE_PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) $STD htpasswd -cb -B /opt/login.pwd admin "$RCLONE_PASSWORD" -{ - echo "rclone-Credentials" - echo "rclone User Name: admin" - echo "rclone Password: $RCLONE_PASSWORD" -} >>~/rclone.creds +cat <~/rclone.creds +rclone-Credentials +rclone User Name: admin +rclone Password: $RCLONE_PASSWORD +EOF echo "${RELEASE}" >/opt/rclone_version.txt rm -f "$temp_file" msg_ok "Installed rclone" diff --git a/install/alpine-rustdeskserver-install.sh b/install/alpine-rustdeskserver-install.sh index 58ded10b9..99d3fae4e 100644 --- a/install/alpine-rustdeskserver-install.sh +++ b/install/alpine-rustdeskserver-install.sh @@ -40,12 +40,12 @@ mv release /opt/rustdesk-api cd /opt/rustdesk-api ADMINPASS=$(head -c 16 /dev/urandom | xxd -p -c 16) $STD ./apimain reset-admin-pwd "$ADMINPASS" -{ - echo "RustDesk WebUI" - echo "" - echo "Username: admin" - echo "Password: $ADMINPASS" -} >>~/rustdesk.creds +cat <~/rustdesk.creds +RustDesk WebUI + +Username: admin +Password: $ADMINPASS +EOF echo "${APIRELEASE}" >~/.rustdesk-api msg_ok "Installed RustDesk API v${APIRELEASE}" diff --git a/install/alpine-valkey-install.sh b/install/alpine-valkey-install.sh index 5beda4860..02d80865e 100644 --- a/install/alpine-valkey-install.sh +++ b/install/alpine-valkey-install.sh @@ -25,13 +25,12 @@ chmod 600 ~/valkey.creds MEMTOTAL_MB=$(free -m | grep ^Mem: | awk '{print $2}') MAXMEMORY_MB=$((MEMTOTAL_MB * 75 / 100)) -{ - echo "" - echo "# Memory-optimized settings for small-scale deployments" - echo "maxmemory ${MAXMEMORY_MB}mb" - echo "maxmemory-policy allkeys-lru" - echo "maxmemory-samples 10" -} >>/etc/valkey/valkey.conf +cat </etc/valkey/valkey.conf +# Memory-optimized settings for small-scale deployments +maxmemory ${MAXMEMORY_MB}mb +maxmemory-policy allkeys-lru +maxmemory-samples 10 +EOF msg_ok "Installed Valkey" # Note: Alpine's valkey package is compiled without TLS support diff --git a/install/anytype-server-install.sh b/install/anytype-server-install.sh index 8c36f0288..44357de95 100644 --- a/install/anytype-server-install.sh +++ b/install/anytype-server-install.sh @@ -16,7 +16,7 @@ update_os setup_mongodb msg_info "Configuring MongoDB Replica Set" -cat <>/etc/mongod.conf +cat </etc/mongod.conf replication: replSetName: "rs0" diff --git a/install/apache-couchdb-install.sh b/install/apache-couchdb-install.sh index adec84033..df11bc724 100644 --- a/install/apache-couchdb-install.sh +++ b/install/apache-couchdb-install.sh @@ -28,11 +28,11 @@ setup_deb822_repo \ "$(get_os_info codename)" \ "main" $STD apt install -y couchdb -{ - echo "CouchDB Credentials" - echo "CouchDB Erlang Cookie: $ERLANG_COOKIE" - echo "CouchDB Admin Password: $ADMIN_PASS" -} >>~/couchdb.creds +cat <~/couchdb.creds +CouchDB Credentials +CouchDB Erlang Cookie: $ERLANG_COOKIE +CouchDB Admin Password: $ADMIN_PASS +EOF msg_ok "Installed Apache CouchDB" motd_ssh diff --git a/install/apache-guacamole-install.sh b/install/apache-guacamole-install.sh index 17dfe4537..3ecf44abc 100644 --- a/install/apache-guacamole-install.sh +++ b/install/apache-guacamole-install.sh @@ -79,13 +79,13 @@ msg_ok "Setup Apache Guacamole" msg_info "Importing Database Schema" cd ~/guacamole-auth-jdbc-"${GUAC_SERVER_VERSION}"/mysql/schema cat *.sql | mariadb -u root ${MARIADB_DB_NAME} -{ - echo "mysql-hostname: 127.0.0.1" - echo "mysql-port: 3306" - echo "mysql-database: $MARIADB_DB_NAME" - echo "mysql-username: $MARIADB_DB_USER" - echo "mysql-password: $MARIADB_DB_PASS" -} >>/etc/guacamole/guacamole.properties +cat </etc/guacamole/guacamole.properties +mysql-hostname: 127.0.0.1 +mysql-port: 3306 +mysql-database: $MARIADB_DB_NAME +mysql-username: $MARIADB_DB_USER +mysql-password: $MARIADB_DB_PASS +EOF rm -rf ~/guacamole-auth-jdbc-"$GUAC_SERVER_VERSION"{,.tar.gz} msg_ok "Imported Database Schema" diff --git a/install/autobrr-install.sh b/install/autobrr-install.sh index 41d8a8e00..ee912ac45 100644 --- a/install/autobrr-install.sh +++ b/install/autobrr-install.sh @@ -17,7 +17,7 @@ fetch_and_deploy_gh_release "autobrr" "autobrr/autobrr" "prebuild" "latest" "/us msg_info "Configuring Autobrr" mkdir -p /root/.config/autobrr -cat <>/root/.config/autobrr/config.toml +cat </root/.config/autobrr/config.toml # https://autobrr.com/configuration/autobrr host = "0.0.0.0" port = 7474 diff --git a/install/bookorbit-install.sh b/install/bookorbit-install.sh index baf220dfb..275f141d2 100644 --- a/install/bookorbit-install.sh +++ b/install/bookorbit-install.sh @@ -51,7 +51,7 @@ mkdir -p /opt/bookorbit-data/covers /opt/bookorbit-data/book-bucket /opt/bookorb APP_VER=$(cat ~/.bookorbit) JWT_SECRET=$(openssl rand -hex 32) SETUP_BOOTSTRAP_TOKEN=$(openssl rand -hex 16) -cat <>~/bookorbit.creds +cat <~/bookorbit.creds Setup Token: ${SETUP_BOOTSTRAP_TOKEN} EOF diff --git a/install/checkmk-install.sh b/install/checkmk-install.sh index c9b35ef4b..f5ab12e2e 100644 --- a/install/checkmk-install.sh +++ b/install/checkmk-install.sh @@ -29,12 +29,12 @@ MKPASSWORD=$(openssl rand -base64 18 | tr -d '/+=' | cut -c1-16) echo -e "$MKPASSWORD\n$MKPASSWORD" | su - "$SITE_NAME" -c "cmk-passwd cmkadmin --stdin" $STD omd start "$SITE_NAME" -{ - echo "Application-Credentials" - echo "Username: cmkadmin" - echo "Password: $MKPASSWORD" - echo "Site: $SITE_NAME" -} >>~/checkmk.creds +cat <~/checkmk.creds +Application-Credentials +Username: cmkadmin +Password: $MKPASSWORD +Site: $SITE_NAME +EOF msg_ok "Created Service" cleanup_lxc diff --git a/install/crafty-controller-install.sh b/install/crafty-controller-install.sh index 935c5870b..8dc470b27 100644 --- a/install/crafty-controller-install.sh +++ b/install/crafty-controller-install.sh @@ -66,13 +66,13 @@ for i in $(seq 1 30); do sleep 2 done if [[ -f "$CREDS_FILE" ]]; then - { - echo "Crafty-Controller-Credentials" - echo "Username: $(grep -oP '(?<="username": ")[^"]*' "$CREDS_FILE")" - echo "Password: $(grep -oP '(?<="password": ")[^"]*' "$CREDS_FILE")" - } >>~/crafty-controller.creds + cat <~/crafty-controller.creds +Crafty-Controller-Credentials +Username: $(grep -oP '(?<="username": ")[^"]*' "$CREDS_FILE") +Password: $(grep -oP '(?<="password": ")[^"]*' "$CREDS_FILE") +EOF fi msg_ok "Service started" motd_ssh customize -cleanup_lxc \ No newline at end of file +cleanup_lxc diff --git a/install/dolibarr-install.sh b/install/dolibarr-install.sh index f8e1c22c0..975ade6ee 100644 --- a/install/dolibarr-install.sh +++ b/install/dolibarr-install.sh @@ -24,10 +24,10 @@ setup_mariadb msg_info "Setting up Database" ROOT_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD mariadb -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '$ROOT_PASS'; flush privileges;" -{ - echo "Dolibarr DB Credentials" - echo "MariaDB Root Password: $ROOT_PASS" -} >>~/dolibarr.creds +cat <~/dolibarr.creds +Dolibarr DB Credentials +MariaDB Root Password: $ROOT_PASS +EOF msg_ok "Set up database" msg_info "Setup Dolibarr" diff --git a/install/dotnetaspwebapi-install.sh b/install/dotnetaspwebapi-install.sh index c8d0cceec..3c1ac5aae 100644 --- a/install/dotnetaspwebapi-install.sh +++ b/install/dotnetaspwebapi-install.sh @@ -43,11 +43,11 @@ sed -i "s|#chroot_local_user=YES|chroot_local_user=NO|g" /etc/vsftpd.conf systemctl restart -q vsftpd.service -{ - echo "FTP-Credentials" - echo "Username: ftpuser" - echo "Password: $FTP_PASS" -} >>~/ftp.creds +cat <~/ftp.creds +FTP-Credentials +Username: ftpuser +Password: $FTP_PASS +EOF msg_ok "FTP server setup completed" diff --git a/install/duplicati-install.sh b/install/duplicati-install.sh index ab6d1a7fd..76a74c9e5 100644 --- a/install/duplicati-install.sh +++ b/install/duplicati-install.sh @@ -25,10 +25,10 @@ fetch_and_deploy_gh_release "duplicati" "duplicati/duplicati" "binary" "latest" msg_info "Configuring duplicati" DECRYPTKEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) ADMINPASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -{ - echo "Admin password = ${ADMINPASS}" - echo "Database encryption key = ${DECRYPTKEY}" -} >>~/duplicati.creds +cat <~/duplicati.creds +Admin password = ${ADMINPASS} +Database encryption key = ${DECRYPTKEY} +EOF msg_ok "Configured duplicati" msg_info "Creating Service" diff --git a/install/elementsynapse-install.sh b/install/elementsynapse-install.sh index 226b965b3..8a23996bf 100644 --- a/install/elementsynapse-install.sh +++ b/install/elementsynapse-install.sh @@ -44,7 +44,7 @@ ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)" echo "enable_registration_without_verification: true" >>/etc/matrix-synapse/homeserver.yaml echo "registration_shared_secret: ${SECRET}" >>/etc/matrix-synapse/homeserver.yaml -cat <>/etc/matrix-synapse/homeserver.yaml +cat </etc/matrix-synapse/homeserver.yaml # MatrixRTC / Element Call configuration experimental_features: @@ -63,11 +63,11 @@ rc_delayed_event_mgmt: EOF systemctl enable -q --now matrix-synapse $STD register_new_matrix_user -a --user admin --password "$ADMIN_PASS" --config /etc/matrix-synapse/homeserver.yaml -{ - echo "Matrix-Credentials" - echo "Admin username: admin" - echo "Admin password: $ADMIN_PASS" -} >>~/matrix.creds +cat <~/matrix.creds +Matrix-Credentials +Admin username: admin +Admin password: $ADMIN_PASS +EOF systemctl stop matrix-synapse sed -i '34d' /etc/matrix-synapse/homeserver.yaml systemctl start matrix-synapse diff --git a/install/erpnext-install.sh b/install/erpnext-install.sh index 5e1b60cb1..b4b2c3226 100644 --- a/install/erpnext-install.sh +++ b/install/erpnext-install.sh @@ -86,14 +86,14 @@ ADMIN_PASSWORD=${ADMIN_PASS} DB_ROOT_PASSWORD=${DB_ROOT_PASS} SITE_NAME=site1.local EOF -{ - echo "ERPNext Credentials" - echo "==================" - echo "Admin Username: Administrator" - echo "Admin Password: ${ADMIN_PASS}" - echo "DB Root Password: ${DB_ROOT_PASS}" - echo "Site Name: site1.local" -} >~/erpnext.creds +cat <~/erpnext.creds +ERPNext Credentials +================== +Admin Username: Administrator +Admin Password: ${ADMIN_PASS} +DB Root Password: ${DB_ROOT_PASS} +Site Name: site1.local +EOF $STD systemctl enable --now redis-server msg_ok "Configured ERPNext" diff --git a/install/frigate-install.sh b/install/frigate-install.sh index c4113ebaf..c62c8eefb 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -290,7 +290,7 @@ detect: EOF if grep -q -o -m1 -E 'avx[^ ]*|sse4_2' /proc/cpuinfo && [[ -f /openvino-model/ssdlite_mobilenet_v2.xml ]] && [[ -f /openvino-model/coco_91cl_bkgr.txt ]]; then - cat <>/config/config.yml + cat </config/config.yml ffmpeg: hwaccel_args: auto detectors: @@ -306,7 +306,7 @@ model: labelmap_path: /openvino-model/coco_91cl_bkgr.txt EOF else - cat <>/config/config.yml + cat </config/config.yml ffmpeg: hwaccel_args: auto model: diff --git a/install/garage-install.sh b/install/garage-install.sh index 92b66f7fe..469f5c123 100644 --- a/install/garage-install.sh +++ b/install/garage-install.sh @@ -22,12 +22,12 @@ mkdir -p /etc/garage RPC_SECRET=$(openssl rand -hex 32) ADMIN_TOKEN=$(openssl rand -base64 32) METRICS_TOKEN=$(openssl rand -base64 32) -{ - echo "Garage Tokens and Secrets" - echo "RPC Secret: $RPC_SECRET" - echo "Admin Token: $ADMIN_TOKEN" - echo "Metrics Token: $METRICS_TOKEN" -} >>~/garage.creds +cat <~/garage.creds +Garage Tokens and Secrets +RPC Secret: $RPC_SECRET +Admin Token: $ADMIN_TOKEN +Metrics Token: $METRICS_TOKEN +EOF echo $GITEA_RELEASE >>~/.garage cat </etc/garage.toml metadata_dir = "/var/lib/garage/meta" diff --git a/install/ghostfolio-install.sh b/install/ghostfolio-install.sh index d520e0021..62621a568 100644 --- a/install/ghostfolio-install.sh +++ b/install/ghostfolio-install.sh @@ -29,12 +29,12 @@ PG_DB_NAME="ghostfolio" PG_DB_USER="ghostfolio" PG_DB_SCHEMA_PERMS="true" setup_ REDIS_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) ACCESS_TOKEN_SALT=$(openssl rand -base64 32) JWT_SECRET_KEY=$(openssl rand -base64 32) -{ - echo "Ghostfolio Credentials" - echo "Redis Password: $REDIS_PASS" - echo "Access Token Salt: $ACCESS_TOKEN_SALT" - echo "JWT Secret Key: $JWT_SECRET_KEY" -} >>~/ghostfolio.creds +cat <~/ghostfolio.creds +Ghostfolio Credentials +Redis Password: $REDIS_PASS +Access Token Salt: $ACCESS_TOKEN_SALT +JWT Secret Key: $JWT_SECRET_KEY +EOF msg_ok "Set up Database" fetch_and_deploy_gh_release "ghostfolio" "ghostfolio/ghostfolio" "tarball" "latest" "/opt/ghostfolio" diff --git a/install/glpi-install.sh b/install/glpi-install.sh index 4a49b1ce6..af508514a 100644 --- a/install/glpi-install.sh +++ b/install/glpi-install.sh @@ -33,12 +33,12 @@ $STD mariadb -u root -e "CREATE DATABASE $DB_NAME;" $STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" $STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';" $STD mariadb -u root -e "GRANT SELECT ON \`mysql\`.\`time_zone_name\` TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" -{ - echo "GLPI Database Credentials" - echo "Database: $DB_NAME" - echo "Username: $DB_USER" - echo "Password: $DB_PASS" -} >>~/glpi_db.creds +cat <~/glpi_db.creds +GLPI Database Credentials +Database: $DB_NAME +Username: $DB_USER +Password: $DB_PASS +EOF msg_ok "Set up database" msg_info "Installing GLPi" diff --git a/install/graylog-install.sh b/install/graylog-install.sh index 9e00da93f..d3f69edc3 100644 --- a/install/graylog-install.sh +++ b/install/graylog-install.sh @@ -28,11 +28,11 @@ msg_ok "Setup Graylog Data Node" msg_info "Setup ${APPLICATION}" $STD apt-get install graylog-server ROOT_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16) -{ - echo "${APPLICATION} Credentials" - echo "Admin User: admin" - echo "Admin Password: ${ROOT_PASSWORD}" -} >>~/graylog.creds +cat <~/graylog.creds +${APPLICATION} Credentials +Admin User: admin +Admin Password: ${ROOT_PASSWORD} +EOF ROOT_PASSWORD=$(echo -n $ROOT_PASSWORD | shasum -a 256 | awk '{print $1}') sed -i "s/password_secret =/password_secret = $PASSWORD_SECRET/g" /etc/graylog/server/server.conf sed -i "s/root_password_sha2 =/root_password_sha2 = $ROOT_PASSWORD/g" /etc/graylog/server/server.conf diff --git a/install/healthchecks-install.sh b/install/healthchecks-install.sh index 1d6cb8664..1c240f51c 100644 --- a/install/healthchecks-install.sh +++ b/install/healthchecks-install.sh @@ -14,14 +14,14 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ - gcc \ - python3 \ - python3-dev \ - python3-venv \ - libpq-dev \ - libcurl4-openssl-dev \ - libssl-dev \ - caddy + gcc \ + python3 \ + python3-dev \ + python3-venv \ + libpq-dev \ + libcurl4-openssl-dev \ + libssl-dev \ + caddy mkdir -p ~/.config/pip cat >~/.config/pip/pip.conf <>~/healthchecks.creds +cat <~/healthchecks.creds +healthchecks Admin Email: $ADMIN_EMAIL +healthchecks Admin Password: $ADMIN_PASSWORD +EOF msg_ok "Set up Keys" fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks" "tarball" diff --git a/install/hortusfox-install.sh b/install/hortusfox-install.sh index d1f1e1620..d8b0bba3b 100644 --- a/install/hortusfox-install.sh +++ b/install/hortusfox-install.sh @@ -46,12 +46,12 @@ ADMIN_EMAIL="admin@example.com" ADMIN_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)" ADMIN_HASH=$(php -r "echo password_hash('$ADMIN_PASS', PASSWORD_BCRYPT);") $STD mariadb -u root -D $MARIADB_DB_NAME -e "INSERT IGNORE INTO UserModel (name, email, password, admin) VALUES ('Admin', '$ADMIN_EMAIL', '$ADMIN_HASH', 1);" -{ - echo "" - echo "HortusFox-Admin-Creds:" - echo "E-Mail: $ADMIN_EMAIL" - echo "Passwort: $ADMIN_PASS" -} >>~/hortusfox.creds +cat <~/hortusfox.creds + +HortusFox-Admin-Creds: +E-Mail: $ADMIN_EMAIL +Passwort: $ADMIN_PASS +EOF $STD mariadb -u root -D $MARIADB_DB_NAME -e "INSERT IGNORE INTO LocationsModel (name, active, created_at) VALUES ('Home', 1, NOW());" msg_ok "Set up HortusFox" diff --git a/install/immich-install.sh b/install/immich-install.sh index d64589727..88bff3693 100644 --- a/install/immich-install.sh +++ b/install/immich-install.sh @@ -293,13 +293,13 @@ ldconfig /usr/local/lib cd "$STAGING_DIR" rm -rf "$SOURCE"/build msg_ok "(5/5) Compiled libvips" -{ - echo "imagemagick: $IMAGEMAGICK_REVISION" - echo "libheif: $LIBHEIF_REVISION" - echo "libjxl: $LIBJXL_REVISION" - echo "libraw: $LIBRAW_REVISION" - echo "libvips: $LIBVIPS_REVISION" -} >~/.immich_library_revisions +cat <~/.immich_library_revisions +imagemagick: $IMAGEMAGICK_REVISION +libheif: $LIBHEIF_REVISION +libjxl: $LIBJXL_REVISION +libraw: $LIBRAW_REVISION +libvips: $LIBVIPS_REVISION +EOF msg_ok "Custom Photo-processing Libraries Compiled Successfully" INSTALL_DIR="/opt/${APPLICATION}" diff --git a/install/ironclaw-install.sh b/install/ironclaw-install.sh index 83b63926a..a6446690b 100644 --- a/install/ironclaw-install.sh +++ b/install/ironclaw-install.sh @@ -30,10 +30,10 @@ chmod +x /usr/local/bin/ironclaw msg_info "Configuring Environment" GATEWAY_TOKEN=$(openssl rand -hex 32) mkdir -p /root/.ironclaw -{ - echo "Gateway-Token" - echo "Token: $GATEWAY_TOKEN" -} >> /root/.ironclaw/gateway.creds +cat </root/.ironclaw/gateway.creds +Gateway-Token +Token: $GATEWAY_TOKEN +EOF mkdir -p /root/.ironclaw cat </root/.ironclaw/.env diff --git a/install/kimai-install.sh b/install/kimai-install.sh index f506369a0..1531abf14 100644 --- a/install/kimai-install.sh +++ b/install/kimai-install.sh @@ -33,12 +33,12 @@ MYSQL_VERSION=$(mariadb --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') $STD mariadb -e "CREATE DATABASE $DB_NAME;" $STD mariadb -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" $STD mariadb -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" -{ - echo "Kimai-Credentials" - echo "Kimai Database User: $DB_USER" - echo "Kimai Database Password: $DB_PASS" - echo "Kimai Database Name: $DB_NAME" -} >>~/kimai.creds +cat <~/kimai.creds +Kimai-Credentials +Kimai Database User: $DB_USER +Kimai Database Password: $DB_PASS +Kimai Database Name: $DB_NAME +EOF msg_ok "Set up database" fetch_and_deploy_gh_release "kimai" "kimai/kimai" "tarball" diff --git a/install/librenms-install.sh b/install/librenms-install.sh index 9fa2a0f27..a8002ee2f 100644 --- a/install/librenms-install.sh +++ b/install/librenms-install.sh @@ -116,11 +116,11 @@ cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf APP_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) APP_USER="admin" -{ - echo "LibreNMS Credentials" - echo "Username: ${APP_USER}" - echo "Password: ${APP_PASSWORD}" -} >>~/librenms.creds +cat <~/librenms.creds +LibreNMS Credentials +Username: ${APP_USER} +Password: ${APP_PASSWORD} +EOF $STD su - librenms -s /bin/bash -c "cd /opt/librenms && COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev" $STD su - librenms -s /bin/bash -c "cd /opt/librenms && php8.4 artisan migrate --force" diff --git a/install/limesurvey-install.sh b/install/limesurvey-install.sh index c12468a91..31dc998e4 100644 --- a/install/limesurvey-install.sh +++ b/install/limesurvey-install.sh @@ -23,12 +23,12 @@ DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" $STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" -{ - echo "LimeSurvey-Credentials" - echo "LimeSurvey Database User: $DB_USER" - echo "LimeSurvey Database Password: $DB_PASS" - echo "LimeSurvey Database Name: $DB_NAME" -} >>~/limesurvey.creds +cat <~/limesurvey.creds +LimeSurvey-Credentials +LimeSurvey Database User: $DB_USER +LimeSurvey Database Password: $DB_PASS +LimeSurvey Database Name: $DB_NAME +EOF msg_ok "Configured MariaDB Database" msg_info "Setting up LimeSurvey" diff --git a/install/listmonk-install.sh b/install/listmonk-install.sh index 22c42a96c..f1fed7ec3 100644 --- a/install/listmonk-install.sh +++ b/install/listmonk-install.sh @@ -21,12 +21,12 @@ DB_USER=listmonk DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" -{ - echo "listmonk-Credentials" - echo -e "listmonk Database User: \e[32m$DB_USER\e[0m" - echo -e "listmonk Database Password: \e[32m$DB_PASS\e[0m" - echo -e "listmonk Database Name: \e[32m$DB_NAME\e[0m" -} >>~/listmonk.creds +cat <~/listmonk.creds +listmonk-Credentials +listmonk Database User: $DB_USER +listmonk Database Password: $DB_PASS +listmonk Database Name: $DB_NAME +EOF msg_ok "Configured PostgreSQL" fetch_and_deploy_gh_release "listmonk" "knadh/listmonk" "prebuild" "latest" "/opt/listmonk" "listmonk*linux_$(arch_resolve).tar.gz" diff --git a/install/livebook-install.sh b/install/livebook-install.sh index adb5d5c47..d09e3d800 100644 --- a/install/livebook-install.sh +++ b/install/livebook-install.sh @@ -67,10 +67,10 @@ export ERLANG_BIN="/opt/livebook/.elixir-install/installs/otp/\${ERLANG_VERSION} export ELIXIR_BIN="/opt/livebook/.elixir-install/installs/elixir/\${ELIXIR_VERSION}/bin" export PATH="\$ESCRIPTS_BIN:\$ERLANG_BIN:\$ELIXIR_BIN:\$PATH" EOF -{ - echo "Livebook-Credentials" - echo "Livebook Password: $LIVEBOOK_PASSWORD" -} >>~/livebook.creds +cat <~/livebook.creds +Livebook-Credentials +Livebook Password: $LIVEBOOK_PASSWORD +EOF msg_ok "Installed Erlang $ERLANG_VERSION and Elixir $ELIXIR_VERSION" msg_info "Installing Livebook" diff --git a/install/managemydamnlife-install.sh b/install/managemydamnlife-install.sh index 02669e687..9001ebb10 100644 --- a/install/managemydamnlife-install.sh +++ b/install/managemydamnlife-install.sh @@ -27,12 +27,12 @@ DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD mariadb -u root -e "CREATE DATABASE $DB_NAME;" $STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED by '$DB_PASS';" $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" -{ - echo "Manage My Damn Life Credentials" - echo "Database User: $DB_USER" - echo "Database Password: $DB_PASS" - echo "Database Name: $DB_NAME" -} >>~/mmdl.creds +cat <~/mmdl.creds +Manage My Damn Life Credentials +Database User: $DB_USER +Database Password: $DB_PASS +Database Name: $DB_NAME +EOF msg_ok "Set up Database" fetch_and_deploy_gh_release "mmdl" "intri-in/manage-my-damn-life-nextjs" "tarball" diff --git a/install/mattermost-install.sh b/install/mattermost-install.sh index 4a4d27df2..f5ba870d3 100644 --- a/install/mattermost-install.sh +++ b/install/mattermost-install.sh @@ -35,12 +35,12 @@ $STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" $STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;" $STD sudo -u postgres psql -c "GRANT USAGE, CREATE ON SCHEMA PUBLIC TO $DB_USER;" -{ - echo "Mattermost Credentials" - echo "Database User: $DB_USER" - echo "Database Password: $DB_PASS" - echo "Database Name: $DB_NAME" -} >>~/mattermost.creds +cat <~/mattermost.creds +Mattermost Credentials +Database User: $DB_USER +Database Password: $DB_PASS +Database Name: $DB_NAME +EOF msg_ok "Set up PostgreSQL" msg_info "Installing Mattermost" diff --git a/install/mediamanager-install.sh b/install/mediamanager-install.sh index dcd092bcb..7240c649e 100644 --- a/install/mediamanager-install.sh +++ b/install/mediamanager-install.sh @@ -30,12 +30,12 @@ DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" -{ - echo "MediaManager Credentials" - echo "MediaManager Database User: $DB_USER" - echo "MediaManager Database Password: $DB_PASS" - echo "MediaManager Database Name: $DB_NAME" -} >>~/mediamanager.creds +cat <~/mediamanager.creds +MediaManager Credentials +MediaManager Database User: $DB_USER +MediaManager Database Password: $DB_PASS +MediaManager Database Name: $DB_NAME +EOF msg_ok "Set up PostgreSQL" fetch_and_deploy_gh_release "MediaManager" "maxdorninger/MediaManager" "tarball" "latest" "/opt/mediamanager" diff --git a/install/miniflux-install.sh b/install/miniflux-install.sh index 9689f9fab..48d0e4ed0 100644 --- a/install/miniflux-install.sh +++ b/install/miniflux-install.sh @@ -28,10 +28,10 @@ ADMIN_USERNAME=$ADMIN_NAME ADMIN_PASSWORD=$ADMIN_PASS LISTEN_ADDR=0.0.0.0:8080 EOF -{ - echo "ADMIN_USERNAME: $ADMIN_NAME" - echo "ADMIN_PASSWORD: $ADMIN_PASS" -} >>~/miniflux.creds +cat <~/miniflux.creds +ADMIN_USERNAME: $ADMIN_NAME +ADMIN_PASSWORD: $ADMIN_PASS +EOF $STD miniflux -migrate -config-file /etc/miniflux.conf systemctl enable -q --now miniflux msg_ok "Configured Miniflux" diff --git a/install/netbox-install.sh b/install/netbox-install.sh index 1387190aa..e844da809 100644 --- a/install/netbox-install.sh +++ b/install/netbox-install.sh @@ -85,12 +85,12 @@ user.is_superuser = True user.is_staff = True user.save() EOF -{ - echo "" - echo "Netbox-Django-Credentials" - echo -e "Django User: \e[32m$DJANGO_USER\e[0m" - echo -e "Django Password: \e[32m$DJANGO_PASS\e[0m" -} >>~/netbox.creds +cat <~/netbox.creds + +Netbox-Django-Credentials +Django User: $DJANGO_USER +Django Password: $DJANGO_PASS +EOF msg_ok "Setup Django Admin" motd_ssh diff --git a/install/nightscout-install.sh b/install/nightscout-install.sh index e6dcd5651..a1ae1f02e 100644 --- a/install/nightscout-install.sh +++ b/install/nightscout-install.sh @@ -59,10 +59,10 @@ EOF systemctl enable -q --now nightscout msg_ok "Created Service" -{ - echo "Nightscout Credentials" - echo "API_SECRET: ${API_SECRET}" -} >> ~/nightscout.creds +cat <~/nightscout.creds +Nightscout Credentials +API_SECRET: ${API_SECRET} +EOF motd_ssh customize diff --git a/install/nodebb-install.sh b/install/nodebb-install.sh index 73468576c..8c040df26 100644 --- a/install/nodebb-install.sh +++ b/install/nodebb-install.sh @@ -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 <~/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 <>~/odoo.creds +cat <~/odoo.creds +Odoo-Credentials +Odoo Database User: $DB_USER +Odoo Database Password: $DB_PASS +Odoo Database Name: $DB_NAME +EOF msg_ok "Setup PostgreSQL" msg_info "Configuring Odoo" diff --git a/install/onlyoffice-install.sh b/install/onlyoffice-install.sh index 960c370e8..f547382e0 100644 --- a/install/onlyoffice-install.sh +++ b/install/onlyoffice-install.sh @@ -30,12 +30,12 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" -{ - echo "ONLYOFFICE-Credentials" - echo "ONLYOFFICE Database User: $DB_USER" - echo "ONLYOFFICE Database Password: $DB_PASS" - echo "ONLYOFFICE Database Name: $DB_NAME" -} >>~/onlyoffice.creds +cat <~/onlyoffice.creds +ONLYOFFICE-Credentials +ONLYOFFICE Database User: $DB_USER +ONLYOFFICE Database Password: $DB_PASS +ONLYOFFICE Database Name: $DB_NAME +EOF msg_ok "Set up Database" msg_info "Adding ONLYOFFICE GPG Key" @@ -81,16 +81,13 @@ echo onlyoffice-documentserver onlyoffice/rabbitmq-pwd password $RMQ_PASS | debc echo onlyoffice-documentserver onlyoffice/jwt-enabled boolean true | debconf-set-selections echo onlyoffice-documentserver onlyoffice/jwt-secret password $JWT_SECRET | debconf-set-selections -echo "RabbitMQ User: $RMQ_USER" >>~/onlyoffice.creds -echo "RabbitMQ Password: $RMQ_PASS" >>~/onlyoffice.creds -echo "JWT Secret: $JWT_SECRET" >>~/onlyoffice.creds -{ - echo "" - echo "ONLYOFFICE RabbitMQ Credentials" - echo "User: $RMQ_USER" - echo "Password: $RMQ_PASS" - echo "Secret: $JWT_SECRET" -} >>~/onlyoffice.creds +cat <~/onlyoffice.creds + +ONLYOFFICE RabbitMQ Credentials +User: $RMQ_USER +Password: $RMQ_PASS +Secret: $JWT_SECRET +EOF msg_ok "Debconf Preconfiguration Done" msg_info "Installing ttf-mscorefonts-installer" diff --git a/install/paperclip-install.sh b/install/paperclip-install.sh index 585b665f9..3f4624006 100644 --- a/install/paperclip-install.sh +++ b/install/paperclip-install.sh @@ -112,7 +112,7 @@ if grep -q 'authenticated' $PAPERCLIP_CONFIG; then PAPERCLIP_INVITE_URL=$(awk -F'Invite URL: ' '/Invite URL:/ {print $2; exit}' "$PAPERCLIP_BOOTSTRAP_LOG") PAPERCLIP_INVITE_EXPIRY=$(awk -F'Expires: ' '/Expires:/ {print $2; exit}' "$PAPERCLIP_BOOTSTRAP_LOG") if [[ -n "$PAPERCLIP_INVITE_URL" ]]; then - cat <>~/paperclip.creds + cat <~/paperclip.creds Paperclip Admin Invite Invite URL: ${PAPERCLIP_INVITE_URL} diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 639783a89..19f33a70b 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -56,12 +56,12 @@ curl -fsSL "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/p mkdir -p /opt/paperless_data/{consume,data,media,trash} mkdir -p /opt/paperless/static SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" -{ - echo "" - echo "Paperless-ngx Secret Key: $SECRET_KEY" - echo "Paperless-ngx WebUI User: admin" - echo "Paperless-ngx WebUI Password: $PG_DB_PASS" -} >>~/paperless-ngx.creds +cat <~/paperless-ngx.creds + +Paperless-ngx Secret Key: $SECRET_KEY +Paperless-ngx WebUI User: admin +Paperless-ngx WebUI Password: $PG_DB_PASS +EOF sed -i \ -e 's|#PAPERLESS_REDIS=redis://localhost:6379|PAPERLESS_REDIS=redis://localhost:6379|' \ -e "s|#PAPERLESS_CONSUMPTION_DIR=../consume|PAPERLESS_CONSUMPTION_DIR=/opt/paperless_data/consume|" \ diff --git a/install/part-db-install.sh b/install/part-db-install.sh index 110ed3acf..db1cf3a31 100644 --- a/install/part-db-install.sh +++ b/install/part-db-install.sh @@ -30,11 +30,11 @@ $STD php bin/console cache:clear php bin/console doctrine:migrations:migrate -n >~/database-migration-output chown -R www-data:www-data /opt/partdb ADMIN_PASS=$(grep -oP 'The initial password for the "admin" user is: \K\w+' ~/database-migration-output) -{ - echo "" - echo "Part-DB Admin User: admin" - echo "Part-DB Admin Password: $ADMIN_PASS" -} >>~/partdb.creds +cat <~/partdb.creds + +Part-DB Admin User: admin +Part-DB Admin Password: $ADMIN_PASS +EOF rm -rf ~/database-migration-output msg_ok "Installed Part-DB" diff --git a/install/paymenter-install.sh b/install/paymenter-install.sh index 70b281d98..3c1e071ad 100644 --- a/install/paymenter-install.sh +++ b/install/paymenter-install.sh @@ -15,10 +15,10 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ - git \ - nginx \ - redis-server \ - cron + git \ + nginx \ + redis-server \ + cron msg_ok "Installed Dependencies" setup_mariadb @@ -35,12 +35,12 @@ mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb mysql $STD mariadb -u root -e "CREATE DATABASE $DB_NAME;" $STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" $STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost' WITH GRANT OPTION;" -{ - echo "Paymenter Database Credentials" - echo "Database: $DB_NAME" - echo "Username: $DB_USER" - echo "Password: $DB_PASS" -} >>~/paymenter_db.creds +cat <~/paymenter_db.creds +Paymenter Database Credentials +Database: $DB_NAME +Username: $DB_USER +Password: $DB_PASS +EOF cd /opt/paymenter cp .env.example .env $STD composer install --no-dev --optimize-autoloader --no-interaction diff --git a/install/pihole-install.sh b/install/pihole-install.sh index e3f2701aa..c88a7c997 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -119,7 +119,7 @@ edns-packet-max=1232 EOF if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - cat <>/etc/unbound/unbound.conf.d/pi-hole.conf + cat </etc/unbound/unbound.conf.d/pi-hole.conf tls-cert-bundle: "/etc/ssl/certs/ca-certificates.crt" forward-zone: name: "." diff --git a/install/plane-install.sh b/install/plane-install.sh index e5fa04712..2c03938a3 100644 --- a/install/plane-install.sh +++ b/install/plane-install.sh @@ -15,21 +15,21 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ - nginx \ - build-essential \ - libpq-dev \ - libxml2-dev \ - libxslt1-dev \ - libxmlsec1-dev \ - libxmlsec1-openssl \ - pkg-config \ - python3-dev \ - python3-venv \ - redis-server \ - erlang-base \ - erlang-{asn1,crypto,eldap,ftp,inets,mnesia,os-mon,parsetools} \ - erlang-{public-key,runtime-tools,snmp,ssl,syntax-tools,tftp,tools,xmerl} \ - rabbitmq-server + nginx \ + build-essential \ + libpq-dev \ + libxml2-dev \ + libxslt1-dev \ + libxmlsec1-dev \ + libxmlsec1-openssl \ + pkg-config \ + python3-dev \ + python3-venv \ + redis-server \ + erlang-base \ + erlang-{asn1,crypto,eldap,ftp,inets,mnesia,os-mon,parsetools} \ + erlang-{public-key,runtime-tools,snmp,ssl,syntax-tools,tftp,tools,xmerl} \ + rabbitmq-server msg_ok "Installed Dependencies" NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs @@ -86,7 +86,7 @@ VITE_LIVE_BASE_URL=http://${LOCAL_IP} VITE_LIVE_BASE_PATH=/live" # Each Vite app needs its own .env for the build for app in web admin space; do - echo "$FRONTEND_ENV" >/opt/plane/apps/${app}/.env + echo "$FRONTEND_ENV" >/opt/plane/apps/${app}/.env done export NODE_OPTIONS="--max-old-space-size=4096" export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 @@ -271,14 +271,14 @@ WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable -q --now plane-api plane-worker plane-beat plane-live plane-space -{ - echo "RabbitMQ User: plane" - echo "RabbitMQ Password: ${RABBITMQ_PASS}" - echo "MinIO Access Key: ${MINIO_ACCESS_KEY}" - echo "MinIO Secret Key: ${MINIO_SECRET_KEY}" - echo "Secret Key: ${SECRET_KEY}" - echo "Config: /opt/plane/apps/api/.env" -} >>~/plane.creds +cat <~/plane.creds +RabbitMQ User: plane +RabbitMQ Password: ${RABBITMQ_PASS} +MinIO Access Key: ${MINIO_ACCESS_KEY} +MinIO Secret Key: ${MINIO_SECRET_KEY} +Secret Key: ${SECRET_KEY} +Config: /opt/plane/apps/api/.env +EOF msg_ok "Created Services and MinIO Bucket" msg_info "Configuring Nginx" diff --git a/install/planka-install.sh b/install/planka-install.sh index a9fc03d90..aecde83ba 100644 --- a/install/planka-install.sh +++ b/install/planka-install.sh @@ -32,12 +32,12 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" -{ - echo "PLANKA DB Credentials" - echo "PLANKA Database User: $DB_USER" - echo "PLANKA Database Password: $DB_PASS" - echo "PLANKA Database Name: $DB_NAME" -} >>~/planka.creds +cat <~/planka.creds +PLANKA DB Credentials +PLANKA Database User: $DB_USER +PLANKA Database Password: $DB_PASS +PLANKA Database Name: $DB_NAME +EOF msg_ok "Set up PostgreSQL Database" fetch_and_deploy_gh_release "planka" "plankanban/planka" "prebuild" "latest" "/opt/planka" "planka-prebuild.zip" @@ -67,14 +67,14 @@ echo "DEFAULT_ADMIN_NAME=$ADMIN_NAME" >>.env echo "DEFAULT_ADMIN_USERNAME=$ADMIN_USERNAME" >>.env $STD npm run db:seed sed -i '/# Temporary admin user creation settings/,$d' .env -{ - echo "" - echo "PLANKA Admin Credentials" - echo "Admin Email: $ADMIN_EMAIL" - echo "Admin Password: $ADMIN_PASSWORD" - echo "Admin Name: $ADMIN_NAME" - echo "Admin Username: $ADMIN_USERNAME" -} >>~/planka.creds +cat <~/planka.creds + +PLANKA Admin Credentials +Admin Email: $ADMIN_EMAIL +Admin Password: $ADMIN_PASSWORD +Admin Name: $ADMIN_NAME +Admin Username: $ADMIN_USERNAME +EOF msg_ok "Created Admin User" msg_info "Creating Service" diff --git a/install/pterodactyl-panel-install.sh b/install/pterodactyl-panel-install.sh index 7c5d3f8f8..08dc41b74 100644 --- a/install/pterodactyl-panel-install.sh +++ b/install/pterodactyl-panel-install.sh @@ -52,12 +52,12 @@ DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD mariadb -u root -e "CREATE DATABASE $DB_NAME;" $STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" -{ - echo "pterodactyl Panel-Credentials" - echo "pterodactyl Panel Database User: $DB_USER" - echo "pterodactyl Panel Database Password: $DB_PASS" - echo "pterodactyl Panel Database Name: $DB_NAME" -} >>~/pterodactyl-panel.creds +cat <~/pterodactyl-panel.creds +pterodactyl Panel-Credentials +pterodactyl Panel Database User: $DB_USER +pterodactyl Panel Database Password: $DB_PASS +pterodactyl Panel Database Name: $DB_NAME +EOF msg_ok "Set up MariaDB" read -p "${TAB3}Provide an email address for admin login, this should be a valid email address: " ADMIN_EMAIL @@ -82,12 +82,12 @@ echo "* * * * * php /opt/pterodactyl-panel/artisan schedule:run >> /dev/null 2>& chown -R www-data:www-data /opt/pterodactyl-panel/* chmod -R 755 /opt/pterodactyl-panel/storage/* /opt/pterodactyl-panel/bootstrap/cache/ ln -s /opt/pterodactyl-panel /var/www/pterodactyl -{ - echo "" - echo "pterodactyl Admin Username: admin" - echo "pterodactyl Admin Email: $ADMIN_EMAIL" - echo "pterodactyl Admin Password: $ADMIN_PASS" -} >>~/pterodactyl-panel.creds +cat <~/pterodactyl-panel.creds + +pterodactyl Admin Username: admin +pterodactyl Admin Email: $ADMIN_EMAIL +pterodactyl Admin Password: $ADMIN_PASS +EOF rm -rf "/opt/pterodactyl-panel/panel.tar.gz" rm -rf "/tmp/debsuryorg-archive-keyring.deb" echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt diff --git a/install/radicale-install.sh b/install/radicale-install.sh index 30c7144b5..18adbea2a 100644 --- a/install/radicale-install.sh +++ b/install/radicale-install.sh @@ -24,11 +24,11 @@ msg_info "Setting up Radicale" cd /opt/radicale RNDPASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD htpasswd -c -b -5 /opt/radicale/users admin "$RNDPASS" -{ - echo "Radicale Credentials" - echo "Admin User: admin" - echo "Admin Password: $RNDPASS" -} >>~/radicale.creds +cat <~/radicale.creds +Radicale Credentials +Admin User: admin +Admin Password: $RNDPASS +EOF mkdir -p /etc/radicale cat </etc/radicale/config diff --git a/install/rclone-install.sh b/install/rclone-install.sh index 2ab54de3c..af3305a4c 100644 --- a/install/rclone-install.sh +++ b/install/rclone-install.sh @@ -23,11 +23,11 @@ msg_info "Installing rclone" cd /opt/rclone RCLONE_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD htpasswd -cb -B /opt/login.pwd admin "$RCLONE_PASSWORD" -{ - echo "rclone-Credentials" - echo "rclone User Name: admin" - echo "rclone Password: $RCLONE_PASSWORD" -} >>~/rclone.creds +cat <~/rclone.creds +rclone-Credentials +rclone User Name: admin +rclone Password: $RCLONE_PASSWORD +EOF msg_ok "Installed rclone" msg_info "Creating Service" diff --git a/install/splunk-enterprise-install.sh b/install/splunk-enterprise-install.sh index 9bc062726..f2a2c9336 100644 --- a/install/splunk-enterprise-install.sh +++ b/install/splunk-enterprise-install.sh @@ -27,18 +27,18 @@ while true; do echo -e "${TAB3}Do you accept the Splunk General Terms? (y/N): \c" read -r response case $response in - [Yy]|[Yy][Ee][Ss]) - msg_ok "Terms accepted. Proceeding with installation..." - break - ;; - [Nn]|[Nn][Oo]|"") - msg_error "Terms not accepted. Installation cannot proceed." - msg_error "Please review the terms and run the script again if you wish to proceed." - exit 254 - ;; - *) - msg_error "Invalid response. Please enter 'y' for yes or 'n' for no." - ;; + [Yy] | [Yy][Ee][Ss]) + msg_ok "Terms accepted. Proceeding with installation..." + break + ;; + [Nn] | [Nn][Oo] | "") + msg_error "Terms not accepted. Installation cannot proceed." + msg_error "Please review the terms and run the script again if you wish to proceed." + exit 254 + ;; + *) + msg_error "Invalid response. Please enter 'y' for yes or 'n' for no." + ;; esac done @@ -59,13 +59,13 @@ msg_ok "Setup Splunk Enterprise v${RELEASE}" msg_info "Creating Splunk admin user" ADMIN_USER="admin" ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -{ - echo "Splunk-Credentials" - echo "Username: $ADMIN_USER" - echo "Password: $ADMIN_PASS" -} >> ~/splunk.creds +cat <~/splunk.creds +Splunk-Credentials +Username: $ADMIN_USER +Password: $ADMIN_PASS +EOF -cat << EOF > "/opt/splunk/etc/system/local/user-seed.conf" +cat <"/opt/splunk/etc/system/local/user-seed.conf" [user_info] USERNAME = $ADMIN_USER PASSWORD = $ADMIN_PASS diff --git a/install/stirling-pdf-install.sh b/install/stirling-pdf-install.sh index e80c17547..41d6d56d3 100644 --- a/install/stirling-pdf-install.sh +++ b/install/stirling-pdf-install.sh @@ -103,7 +103,7 @@ PATH=/opt/.venv/bin:/usr/lib/libreoffice/program:/usr/local/sbin:/usr/local/bin: EOF if [[ "$login_mode" == "true" ]]; then - cat <>/opt/Stirling-PDF/.env + cat </opt/Stirling-PDF/.env # activate Login DISABLE_ADDITIONAL_FEATURES=false SECURITY_ENABLELOGIN=true diff --git a/install/storyteller-install.sh b/install/storyteller-install.sh index 9574bb0f2..b3b343da6 100644 --- a/install/storyteller-install.sh +++ b/install/storyteller-install.sh @@ -46,11 +46,11 @@ NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 EOF mkdir -p /opt/storyteller/data -{ - echo "Storyteller Credentials" - echo "=======================" - echo "Secret Key: ${STORYTELLER_SECRET_KEY}" -} >~/storyteller.creds +cat <~/storyteller.creds +Storyteller Credentials +======================= +Secret Key: ${STORYTELLER_SECRET_KEY} +EOF msg_ok "Set up Storyteller" msg_info "Building Storyteller" diff --git a/install/tubearchivist-install.sh b/install/tubearchivist-install.sh index bc69181af..0ab17f314 100644 --- a/install/tubearchivist-install.sh +++ b/install/tubearchivist-install.sh @@ -106,13 +106,13 @@ TZ=UTC PYTHONUNBUFFERED=1 YTDLP_PLUGIN_DIRS=/opt/yt_plugins EOF -{ - echo "Tube Archivist Credentials" - echo "==========================" - echo "Username: admin" - echo "Password: ${TA_PASSWORD}" - echo "Elasticsearch Password: ${ES_PASSWORD}" -} >~/tubearchivist.creds +cat <~/tubearchivist.creds +Tube Archivist Credentials +========================== +Username: admin +Password: ${TA_PASSWORD} +Elasticsearch Password: ${ES_PASSWORD} +EOF systemctl enable -q --now redis-server msg_ok "Set up Tube Archivist" diff --git a/install/twingate-connector-install.sh b/install/twingate-connector-install.sh index d873d1df8..8d42c0faf 100644 --- a/install/twingate-connector-install.sh +++ b/install/twingate-connector-install.sh @@ -38,13 +38,13 @@ $STD apt-get install -y twingate-connector msg_ok "Setup Twingate Connector" msg_info "Configure Twingate-Connector" -{ - echo "TWINGATE_NETWORK=${network}" - echo "TWINGATE_ACCESS_TOKEN=${access_token}" - echo "TWINGATE_REFRESH_TOKEN=${refresh_token}" - echo "TWINGATE_LABEL_HOSTNAME=$(hostname)" - echo "TWINGATE_LABEL_DEPLOYED_BY=proxmox" -} >/etc/twingate/connector.conf +cat </etc/twingate/connector.conf +TWINGATE_NETWORK=${network} +TWINGATE_ACCESS_TOKEN=${access_token} +TWINGATE_REFRESH_TOKEN=${refresh_token} +TWINGATE_LABEL_HOSTNAME=$(hostname) +TWINGATE_LABEL_DEPLOYED_BY=proxmox +EOF chmod 600 /etc/twingate/connector.conf msg_ok "Configured Twingate-Connector" diff --git a/install/valkey-install.sh b/install/valkey-install.sh index 0bd06db1c..e6aa2904b 100644 --- a/install/valkey-install.sh +++ b/install/valkey-install.sh @@ -19,7 +19,7 @@ $STD apt install -y valkey openssl sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf PASS="$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c32)" -echo "requirepass $PASS" >> /etc/valkey/valkey.conf +echo "requirepass $PASS" >>/etc/valkey/valkey.conf echo "$PASS" >~/valkey.creds chmod 600 ~/valkey.creds @@ -27,11 +27,11 @@ MEMTOTAL_MB=$(free -m | grep ^Mem: | awk '{print $2}') # reserve 25% of a node type's maxmemory value for system use MAXMEMORY_MB=$((MEMTOTAL_MB * 75 / 100)) -echo "" >> /etc/valkey/valkey.conf -echo "# Memory-optimized settings for small-scale deployments" >> /etc/valkey/valkey.conf -echo "maxmemory ${MAXMEMORY_MB}mb" >> /etc/valkey/valkey.conf -echo "maxmemory-policy allkeys-lru" >> /etc/valkey/valkey.conf -echo "maxmemory-samples 10" >> /etc/valkey/valkey.conf +echo "" >>/etc/valkey/valkey.conf +echo "# Memory-optimized settings for small-scale deployments" >>/etc/valkey/valkey.conf +echo "maxmemory ${MAXMEMORY_MB}mb" >>/etc/valkey/valkey.conf +echo "maxmemory-policy allkeys-lru" >>/etc/valkey/valkey.conf +echo "maxmemory-samples 10" >>/etc/valkey/valkey.conf msg_ok "Installed Valkey" echo @@ -47,26 +47,26 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then chown valkey:valkey "$TLS_CERT" "$TLS_KEY" if [[ ${tls_only,,} =~ ^(y|yes)$ ]]; then - { - echo "" - echo "# TLS configuration generated by Proxmox VE Valkey helper-script" - echo "port 0" - echo "tls-port 6379" - echo "tls-cert-file $TLS_DIR/valkey.crt" - echo "tls-key-file $TLS_DIR/valkey.key" - echo "tls-auth-clients no" - } >> /etc/valkey/valkey.conf - msg_ok "Enabled TLS-only mode on port 6379" + cat </etc/valkey/valkey.conf + +# TLS configuration generated by Proxmox VE Valkey helper-script +port 0 +tls-port 6379 +tls-cert-file $TLS_DIR/valkey.crt +tls-key-file $TLS_DIR/valkey.key +tls-auth-clients no +EOF + msg_ok "Enabled TLS-only mode on port 6379" else - { - echo "" - echo "# TLS configuration generated by Proxmox VE Valkey helper-script" - echo "tls-port 6380" - echo "tls-cert-file $TLS_DIR/valkey.crt" - echo "tls-key-file $TLS_DIR/valkey.key" - echo "tls-auth-clients no" - } >> /etc/valkey/valkey.conf - msg_ok "Enabled TLS on port 6380 and TCP on 6379" + cat </etc/valkey/valkey.conf + +# TLS configuration generated by Proxmox VE Valkey helper-script +tls-port 6380 +tls-cert-file $TLS_DIR/valkey.crt +tls-key-file $TLS_DIR/valkey.key +tls-auth-clients no +EOF + msg_ok "Enabled TLS on port 6380 and TCP on 6379" fi fi diff --git a/install/warracker-install.sh b/install/warracker-install.sh index 4528f5e73..e991f18b8 100644 --- a/install/warracker-install.sh +++ b/install/warracker-install.sh @@ -35,14 +35,14 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME OWNER $DB_ADMIN_USER;" $STD sudo -u postgres psql -d "$DB_NAME" -c "GRANT USAGE ON SCHEMA public TO $DB_USER;" $STD sudo -u postgres psql -d "$DB_NAME" -c "GRANT CREATE ON SCHEMA public TO $DB_USER;" $STD sudo -u postgres psql -d "$DB_NAME" -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO $DB_USER;" -{ - echo "Application Credentials" - echo "DB_NAME: $DB_NAME" - echo "DB_USER: $DB_USER" - echo "DB_PASS: $DB_PASS" - echo "DB_ADMIN_USER: $DB_ADMIN_USER" - echo "DB_ADMIN_PASS: $DB_ADMIN_PASS" -} >>~/warracker.creds +cat <~/warracker.creds +Application Credentials +DB_NAME: $DB_NAME +DB_USER: $DB_USER +DB_PASS: $DB_PASS +DB_ADMIN_USER: $DB_ADMIN_USER +DB_ADMIN_PASS: $DB_ADMIN_PASS +EOF msg_ok "Setup PostgreSQL" fetch_and_deploy_gh_release "warracker" "sassanix/Warracker" "tarball" "latest" "/opt/warracker" diff --git a/install/webtrees-install.sh b/install/webtrees-install.sh index 3056cea2d..c2be2e79e 100644 --- a/install/webtrees-install.sh +++ b/install/webtrees-install.sh @@ -63,7 +63,7 @@ $STD sudo -u www-data php /opt/webtrees/index.php user Admin \ --password="${WT_ADMIN_PASS}" $STD sudo -u www-data php /opt/webtrees/index.php user-setting Admin canadmin 1 -cat <>~/webtrees.creds +cat <~/webtrees.creds Webtrees Admin User: Admin Webtrees Admin Password: ${WT_ADMIN_PASS} diff --git a/install/yt-dlp-webui-install.sh b/install/yt-dlp-webui-install.sh index fb6665ede..845296731 100644 --- a/install/yt-dlp-webui-install.sh +++ b/install/yt-dlp-webui-install.sh @@ -24,11 +24,11 @@ msg_info "Setting up YT-DLP-WEBUI" mkdir -p /opt/yt-dlp-webui mkdir /downloads RPC_PASSWORD=$(openssl rand -base64 16) -{ - echo "yt-dlp-webui-Credentials" - echo "Username: admin" - echo "Password: ${RPC_PASSWORD}" -} >>~/yt-dlp-webui.creds +cat <~/yt-dlp-webui.creds +yt-dlp-webui-Credentials +Username: admin +Password: ${RPC_PASSWORD} +EOF cat </opt/yt-dlp-webui/config.conf # Host where server will listen at (default: "0.0.0.0") diff --git a/install/zammad-install.sh b/install/zammad-install.sh index e86120f1e..1cd56f63b 100644 --- a/install/zammad-install.sh +++ b/install/zammad-install.sh @@ -30,7 +30,7 @@ setup_deb822_repo \ $STD apt install -y elasticsearch sed -i 's/^#\{0,2\} *-Xms[0-9]*g.*/-Xms2g/' /etc/elasticsearch/jvm.options sed -i 's/^#\{0,2\} *-Xmx[0-9]*g.*/-Xmx2g/' /etc/elasticsearch/jvm.options -cat <>/etc/elasticsearch/elasticsearch.yml +cat </etc/elasticsearch/elasticsearch.yml discovery.type: single-node xpack.security.enabled: false bootstrap.memory_lock: false diff --git a/install/zitadel-install.sh b/install/zitadel-install.sh index 82f32e398..d203b4051 100644 --- a/install/zitadel-install.sh +++ b/install/zitadel-install.sh @@ -29,14 +29,14 @@ systemctl start postgresql $STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE USER $DB_ADMIN_USER WITH PASSWORD '$DB_ADMIN_PASS' SUPERUSER;" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME OWNER $DB_ADMIN_USER;" -{ - echo "Application Credentials" - echo "DB_NAME: $DB_NAME" - echo "DB_USER: $DB_USER" - echo "DB_PASS: $DB_PASS" - echo "DB_ADMIN_USER: $DB_ADMIN_USER" - echo "DB_ADMIN_PASS: $DB_ADMIN_PASS" -} >>~/zitadel.creds +cat <~/zitadel.creds +Application Credentials +DB_NAME: $DB_NAME +DB_USER: $DB_USER +DB_PASS: $DB_PASS +DB_ADMIN_USER: $DB_ADMIN_USER +DB_ADMIN_PASS: $DB_ADMIN_PASS +EOF msg_ok "Installed PostgreSQL" fetch_and_deploy_gh_release "zitadel" "zitadel/zitadel" "prebuild" "latest" "/usr/local/bin" "zitadel-linux-$(arch_resolve).tar.gz" @@ -45,10 +45,10 @@ msg_info "Setting up Zitadel Environments" mkdir -p /opt/zitadel echo "/opt/zitadel/config.yaml" >"/opt/zitadel/.config" head -c 32 < <(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9') >"/opt/zitadel/.masterkey" -{ - echo "Config location: $(cat "/opt/zitadel/.config")" - echo "Masterkey: $(cat "/opt/zitadel/.masterkey")" -} >>~/zitadel.creds +cat <~/zitadel.creds +Config location: $(cat "/opt/zitadel/.config") +Masterkey: $(cat "/opt/zitadel/.masterkey") +EOF cat </opt/zitadel/config.yaml Port: 8080 ExternalPort: 8080 diff --git a/install/zot-registry-install.sh b/install/zot-registry-install.sh index 39d7a2d48..5cf9feb49 100644 --- a/install/zot-registry-install.sh +++ b/install/zot-registry-install.sh @@ -24,11 +24,11 @@ mkdir -p /etc/zot curl -fsSL https://raw.githubusercontent.com/project-zot/zot/refs/heads/main/examples/config-ui.json -o /etc/zot/config.json ZOTPASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD htpasswd -b -B -c /etc/zot/htpasswd admin "$ZOTPASSWORD" -{ - echo "Zot-Credentials" - echo "Zot User: admin" - echo "Zot Password: $ZOTPASSWORD" -} >>~/zot.creds +cat <~/zot.creds +Zot-Credentials +Zot User: admin +Zot Password: $ZOTPASSWORD +EOF msg_ok "Configured Zot Registry" msg_info "Setup Service"