hostapd_cli: Allow PID file to be specified
This can help when running multiple hostapd_cli instances per interface and need to kill them correspondingly. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
This commit is contained in:
parent
b6387212f5
commit
b8e5426dad
1 changed files with 5 additions and 2 deletions
|
@ -112,7 +112,7 @@ static void usage(void)
|
||||||
"\n"
|
"\n"
|
||||||
"usage: hostapd_cli [-p<path>] [-i<ifname>] [-hvB] "
|
"usage: hostapd_cli [-p<path>] [-i<ifname>] [-hvB] "
|
||||||
"[-a<path>] \\\n"
|
"[-a<path>] \\\n"
|
||||||
" [-G<ping interval>] [command..]\n"
|
" [-P<pid file>] [-G<ping interval>] [command..]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -h help (show this usage text)\n"
|
" -h help (show this usage text)\n"
|
||||||
|
@ -1317,7 +1317,7 @@ int main(int argc, char *argv[])
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
c = getopt(argc, argv, "a:BhG:i:p:v");
|
c = getopt(argc, argv, "a:BhG:i:p:P:v");
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
break;
|
break;
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
@ -1343,6 +1343,9 @@ int main(int argc, char *argv[])
|
||||||
case 'p':
|
case 'p':
|
||||||
ctrl_iface_dir = optarg;
|
ctrl_iface_dir = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'P':
|
||||||
|
pid_file = optarg;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue