1
0

x-ui-firstboot.service 792 B

12345678910111213141516171819202122
  1. [Unit]
  2. Description=3x-ui first-boot per-instance credential generation
  3. Documentation=https://github.com/MHSanaei/3x-ui
  4. # Run after the network and cloud-init are up, but BEFORE the panel starts, so
  5. # the panel never serves the default admin/admin account.
  6. After=network-online.target cloud-init.service
  7. Wants=network-online.target
  8. Before=x-ui.service
  9. # Skip entirely once the sentinel exists (cheap guard; the script re-checks too).
  10. ConditionPathExists=!/etc/x-ui/.firstboot-done
  11. [Service]
  12. Type=oneshot
  13. RemainAfterExit=yes
  14. # Inherit the same DB configuration the panel uses (sqlite default / postgres).
  15. EnvironmentFile=-/etc/default/x-ui
  16. EnvironmentFile=-/etc/conf.d/x-ui
  17. EnvironmentFile=-/etc/sysconfig/x-ui
  18. ExecStart=/usr/local/x-ui/x-ui-firstboot.sh
  19. [Install]
  20. WantedBy=multi-user.target