mirror of
https://github.com/recklessop/zroc.git
synced 2026-07-03 05:23:13 -04:00
0500ac171c
- 61 files across zroc-ui/ and zroc-ova/ directories - Full content written for: config, auth, API layers, CSS, build files, OVA scripts, backend routes, charts, hooks, constants - Stubs in place for: page components, Sidebar, TopBar, docker-compose, authentik client, blueprint YAML, packer HCL, workflows, setup wizard Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
928 B
Bash
39 lines
928 B
Bash
#!/usr/bin/env bash
|
|
# zroc-ova/scripts/03-setup-wizard.sh
|
|
set -euo pipefail
|
|
echo "==> [03-setup-wizard] Installing setup wizard"
|
|
|
|
install -m 0755 /tmp/zroc-setup /usr/local/bin/zroc-setup
|
|
|
|
cat > /etc/systemd/system/zroc-firstboot.service << 'EOF'
|
|
[Unit]
|
|
Description=zROC First-Boot Setup Wizard
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
ConditionPathExists=!/opt/zroc/.env
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/usr/local/bin/zroc-setup
|
|
StandardInput=tty
|
|
TTYPath=/dev/tty1
|
|
StandardOutput=journal+console
|
|
StandardError=journal+console
|
|
TimeoutStartSec=0
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
|
|
systemctl daemon-reload
|
|
systemctl enable zroc-firstboot.service
|
|
|
|
rm -f /etc/sudoers.d/zroc-packer
|
|
cat > /etc/sudoers.d/zroc << 'EOF'
|
|
zroc ALL=(ALL) NOPASSWD: /usr/bin/docker, /usr/local/bin/zroc-setup, /usr/bin/systemctl restart zroc
|
|
EOF
|
|
chmod 440 /etc/sudoers.d/zroc
|
|
|
|
echo "==> [03-setup-wizard] Done"
|