mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-09 23:12:53 +01:00
security: remove hardcoded credentials in several scripts (#18572)
This commit is contained in:
committed by
GitHub
parent
cfeb555f8b
commit
bf3bd50926
@@ -85,12 +85,16 @@ function install() {
|
||||
mkdir -p "${HOME}/.config/code-server/"
|
||||
|
||||
if [ "$preexisting_config" = false ]; then
|
||||
CS_PASS=$(random_password 20)
|
||||
cat <<EOF >"$config_path"
|
||||
bind-addr: 0.0.0.0:8680
|
||||
auth: none
|
||||
password:
|
||||
auth: password
|
||||
password: ${CS_PASS}
|
||||
cert: false
|
||||
EOF
|
||||
chmod 600 "$config_path"
|
||||
echo -e "Coder Code Server\nPassword: ${CS_PASS}" >~/coder-code-server.creds
|
||||
chmod 600 ~/coder-code-server.creds
|
||||
fi
|
||||
systemctl enable -q --now code-server@"$USER"
|
||||
systemctl restart code-server@"$USER"
|
||||
@@ -111,7 +115,7 @@ EOF
|
||||
msg_ok "Created update script (/usr/local/bin/update_coder-code-server)"
|
||||
|
||||
echo -e "${APP} should be reachable by going to the following URL.
|
||||
${BL}http://${IP}:8680${CL} \n"
|
||||
${BL}http://${IP}:8680${CL} (password in ~/coder-code-server.creds)\n"
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user