mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-24 04:05:03 +00:00
install: answer every prompt from the environment, survive a closed stdin
Every interactive prompt takes a var_<app>_<name> override and treats a closed stdin like Enter (`|| true`), so an install keeps going after the console that started it is gone. Values the script cannot do without end with exit 64 and name the variable to set. Validation loops stop asking when nobody can answer instead of spinning on an empty read.
This commit is contained in:
1 parent
500a860faf
commit
3f0dd1b09b
60 files changed
+212
-146
No files matched your search
@@ -46,7 +46,8 @@ echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile
|
||||
source ~/.bash_profile
|
||||
msg_ok "Installed SQL Server Tools"
|
||||
|
||||
read -r -p "${TAB3}Do you want to run the SQL server setup now? (Later is also possible) <y/N>" prompt
|
||||
prompt="${var_sqlserver2022_setup_now:-}"
|
||||
[[ -n "$prompt" ]] || read -r -p "${TAB3}Do you want to run the SQL server setup now? (Later is also possible) <y/N>" prompt || true
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
/opt/mssql/bin/mssql-conf setup
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user