| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #!/usr/bin/env bash
- # restore-dgx-services.sh — Restore non-essential services on a DGX node.
- # Brings back the services stopped by stop-dgx-services.sh. Machine-specific
- # (DGX), not model-specific.
- #
- # Baked into the sm121 binary at compile time (see src/builtin_scripts.rs);
- # recipes reference it by alias `restore_dgx_services` in an `after_stop` list.
- # The launcher uploads and runs it via SSH on each node.
- set -euo pipefail
- SERVICES_START=(
- snapd.service
- snapd.socket
- fwupd.service
- udisks2.service
- upower.service
- ModemManager.service
- bluetooth.service
- avahi-daemon.service
- cups.service
- cups-browsed.service
- colord.service
- smartmontools.service
- rsyslog.service
- rtkit-daemon.service
- dgx-dashboard-admin.service
- dgx-dashboard.service
- )
- echo "=== [$HOSTNAME] Restoring services ==="
- systemctl daemon-reload 2>/dev/null || true
- for svc in "${SERVICES_START[@]}"; do
- echo " Enabling + starting $svc ..."
- systemctl enable "$svc" 2>/dev/null || true
- systemctl start "$svc" 2>/dev/null || true
- done
- echo "=== [$HOSTNAME] Done ==="
|