build kill command by pid

This commit is contained in:
lakinduakash 2019-04-15 05:00:05 +05:30
parent 9923bcf7bf
commit 34f5ad9234
2 changed files with 8 additions and 0 deletions

View File

@ -18,11 +18,13 @@
#define MKCONFIG "--mkconfig"
#define LOAD_CONFIG "--config"
#define STOP "--stop"
char cmd_start[BUFSIZE];
char cmd_mkconfig[BUFSIZE];
char cmd_config[BUFSIZE];
char cmd_kill[BUFSIZE];
char running_info[BUFSIZE];
char interface_list[BUFSIZE];
@ -86,6 +88,11 @@ int startShell(const char *cmd) {
}
const char* build_kill_create_ap_command(char* pid){
snprintf(cmd_kill, BUFSIZE, "%s %s %s %s", SUDO, CREATE_AP,STOP,pid);
return cmd_kill;
}
int write_config(char* file){
config_t cfg;

View File

@ -21,5 +21,6 @@ static int init_get_running();
static int init_get_interface_list();
char** get_interface_list(int*);
const char* build_kill_create_ap_command(char* pid);
#endif //WIHOTSPOT_H_PROP_H