black-raison-detre
Occasional Visitor
I am trying to add api to merlin's firmware, currently testing it on GT-AC2900. I want to create an appCentre for future addons using Vuejs because the current add-on method is too limiting. I actually have figured out how to change nvram values, trigger rc_service script using js fetch though the httpd appGet.cgi and applyapp.cgi. I haven't upload it to GitHub yet because it is far from complete. But writing custom_settings in /jffs/custom_settings is somewhat restrictive
get is alright, I have test it on browser
this will readout the whole custom_settings.txt into a json object.
writing it you have to write the whole thing though applyapp.cgi. not like nvram values you can get individual value and set individual value.
So I try to create an customAction.cgi to function like nvram write. and support multiple configuration file as well
My work here
But I running into some segmentation fault that I am unable to locate. So maybe someone here can solve it?? Or maybe I should try something simpler.
The httpd source code is really a pain in the ***. I really don't know how those guys in Asus still working on this crap.
get is alright, I have test it on browser
JavaScript:
fetch('appGet.cgi?hook=get_custom_settings()', { credentials: 'same-origin' }).then(resp => console.log(resp.json()))
writing it you have to write the whole thing though applyapp.cgi. not like nvram values you can get individual value and set individual value.
So I try to create an customAction.cgi to function like nvram write. and support multiple configuration file as well
My work here
But I running into some segmentation fault that I am unable to locate. So maybe someone here can solve it?? Or maybe I should try something simpler.
The httpd source code is really a pain in the ***. I really don't know how those guys in Asus still working on this crap.