Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

1.4 KB
Raw Blame
[Unit]
Description=ODS first-boot AP mode (hostapd + dnsmasq captive portal)
# Order AFTER NetworkManager, not before. ap-mode.sh's bring-up calls
# `nmcli device set <iface> managed no` to release the wireless
# interface — that only works if NetworkManager is actually running.
# An earlier draft had `Before=NetworkManager.service`, which let the
# unit start before NM was up; the nmcli release was a no-op, and NM
# could then reclaim the interface from hostapd a moment later. By
# ordering after, we're guaranteed NM is alive to honor the release.
After=network-pre.target NetworkManager.service
Wants=NetworkManager.service

# OPT-IN. This unit is installed but NOT enabled by the installer.
# Enable it manually with `systemctl enable --now ods-ap-mode`
# only after writing /etc/ods/ap-mode.conf with the AP credentials.
# See docs/AP-MODE.md.

[Service]
Type=forking
# ap-mode.sh launches hostapd + dnsmasq in the background then exits.
# Both daemons write PID files into /run/ods-ap-mode/.
ExecStart=__INSTALL_DIR__/scripts/ap-mode.sh up
ExecStop=__INSTALL_DIR__/scripts/ap-mode.sh down
PIDFile=/run/ods-ap-mode/hostapd.pid
RemainAfterExit=yes
# Don't restart automatically — if hostapd died, we want the operator
# to see why. Auto-restart would hide a deeper problem (bad config,
# driver, kernel) behind retry loops.
Restart=no

[Install]
WantedBy=multi-user.target