[Unit] Description=Captive Portal (nginx + dnsmasq) After=network.target hostapd.service Wants=nginx.service dnsmasq.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/systemctl start nginx dnsmasq ExecStop=/bin/systemctl stop nginx dnsmasq [Install] WantedBy=multi-user.target