Skip to content

main/hostapd: make initd script more flexible

Dominique Martinet requested to merge martinetd/aports:hostapd_init into master

We don't actually need an explicit start/stop function here as all the script does is running start-stop-daemon.

Modernise the service by using command/command_args variables, which also has the side benefit of allowing easy support of alternative supervisor if e.g. one wants to auto-restart hostapd on error (which might be useful to ensure it is always up, avoiding locking oneself out...), it is now as simple as this snippet in /etc/conf.d/hostapd:

supervisor=supervise-daemon
supervise_daemon_args="--respawn-delay 3"

I've checked this works for me™, but afaiu we're getting close to the 3.17 split so happy to wait after that's done to merge this -- leaving it to you.

Merge request reports