Quiet first boot installer output
This commit is contained in:
1 parent
87b1d63a26
commit
910e5d1499
2 files changed
+19
-10
No files matched your search
@@ -8,8 +8,10 @@ set -e
|
||||
|
||||
AIPACKAGE_DIR="/opt/aipackage"
|
||||
LOG_FILE="/var/log/cezen-setup.log"
|
||||
INSTALL_LOG_FILE="/var/log/cezen-install.log"
|
||||
export TERM="${TERM:-linux}"
|
||||
exec > >(tee -a "$LOG_FILE") 2>&1
|
||||
touch "$LOG_FILE" "$INSTALL_LOG_FILE"
|
||||
chmod 0644 "$LOG_FILE" "$INSTALL_LOG_FILE"
|
||||
|
||||
detect_iface() {
|
||||
ip route show default 2>/dev/null | awk '/default/ {print $5; exit}'
|
||||
@@ -254,12 +256,19 @@ PY
|
||||
chown root:cezen /opt/cezen/license.json 2>/dev/null || true
|
||||
chmod 0640 /opt/cezen/license.json
|
||||
|
||||
# Mark as configured so this wizard doesn't run again
|
||||
touch /opt/cezen/.setup-done
|
||||
|
||||
# Run the installer
|
||||
bash "$AIPACKAGE_DIR/install.sh" --tier="$TIER"
|
||||
|
||||
whiptail --title "$TITLE" \
|
||||
--msgbox "\nInstaller command finished.\n\nFor detailed logs, run:\n sudo journalctl -u cezen-phase2.service -f\n sudo tail -f /var/log/cezen-install.log" \
|
||||
--infobox "\nInstalling Nexus One AI stack...\n\nThis can take several minutes.\n\nLogs are being written to:\n $INSTALL_LOG_FILE" \
|
||||
$H $W
|
||||
|
||||
if bash "$AIPACKAGE_DIR/install.sh" --tier="$TIER" >> "$INSTALL_LOG_FILE" 2>&1; then
|
||||
# Mark as configured only after the installer finishes successfully.
|
||||
touch /opt/cezen/.setup-done
|
||||
whiptail --title "$TITLE" \
|
||||
--msgbox "\nInstaller command finished successfully.\n\nPortal:\n http://localhost\n\nFor detailed logs, run:\n sudo tail -f $INSTALL_LOG_FILE" \
|
||||
$H $W
|
||||
else
|
||||
whiptail --title "$TITLE" \
|
||||
--msgbox "\nInstaller command failed.\n\nThe setup wizard will run again on next boot.\n\nCheck the log with:\n sudo tail -n 120 $INSTALL_LOG_FILE" \
|
||||
$H $W
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user