0

I am trying to execute a command on hostapd when there is a new connection established.

I used this example:

hostapd: execute a command when there is new connection established

But when I start the script, on device connection, I receive an error:

pi@raspberrypi:~ $ sudo hostapd_cli -a '/onHostapdChange.sh'
Selected interface 'wlan0'

execv: No such file or directory

Could you help me please?

3
  • 2
    Does /onHostapdChange.sh actually exist?
    – Burgi
    Commented Dec 20, 2019 at 14:06
  • Make sure the interpreter at the beginning of your script exists. E.g. (#!/bin/sh)
    – user356765
    Commented Sep 10, 2022 at 17:24
  • What are the parameters to the command? When I tried this hostapd_cli didn't exit. Do you have to re-do this ever time the machine restarts or does it somehow remember to run the script? Commented Jun 10, 2023 at 19:31

1 Answer 1

1

This sounds like, there is no such file at the specified path:

/onHostapdChange.sh

I would suggest you try to put the full path of the shell script inside the argument.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .