OpenSource Ghost
Limp Gawd
- Joined
- Feb 14, 2022
- Messages
- 176
I have a router that is mostly controlled by API, but it allows SSH access to make changes. Some custom parameters I add to hostapd (WiFi) files do not survive reboot. There is already a tool that runs any selected .SH scripts on boot, but the only scripts I know how to use are basic execution of commands for common network tools such as IPTables, which simply requires creating a file that has desired "sudo iptables..." lines and "#!/bin/sh" at the top of the file.
I need a script that adds lines, such as "dtim_period=2", to "/etc/hostapd/radio0.cfg" file and then restarts hostapd process via "killall -9 hostapd" command to apply new parameters added to "radio0.cfg". That is what I have to do manually after every reboot. There may not be a simply way to do this and may require understanding of how to write cron jobs, but that's beyond my level...
I need a script that adds lines, such as "dtim_period=2", to "/etc/hostapd/radio0.cfg" file and then restarts hostapd process via "killall -9 hostapd" command to apply new parameters added to "radio0.cfg". That is what I have to do manually after every reboot. There may not be a simply way to do this and may require understanding of how to write cron jobs, but that's beyond my level...