Need to run a uci command when click on reboot button from luci

what i want to do:
when user connects to wifi he get redirected to the luci interface on address to setup his router as a wireless access point (scan for existing wifi networks and join one of them finally he clicks on save and apply button)
so i added list address '/#/'to config dnsmasq in dhcp to get the nodogsplash work without internet connexion then added a little script to bypass in NDS splash page
to go directly to luci interface.
my problem is that the list address '/#/' in dnsmasq file is stopping internet connection.
so is there any way to run "'uci del_list dhcp.@dnsmasq[0].address='/#/'
and uci commit dhcp" when the user clicks on "save and apply" or on "reboot" button to remove internet blocking from dnsmasq file.
Thank you