How to set router to AP mode

I want to use a script to set the router to AP mode by modifying a few files. Could anyone tell me how to do so? The /etc/config/wireless file already says that the mode is “ap”.