applications/ffwizard: Reload services instead of rebooting the router
authorManuel Munz <freifunk@somakoma.de>
Thu, 20 Jan 2011 13:38:40 +0000 (13:38 +0000)
committerManuel Munz <freifunk@somakoma.de>
Thu, 20 Jan 2011 13:38:40 +0000 (13:38 +0000)
applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua

index 73ec41e7e52d6e27c7fe89aedfa03e47d30b8acb..4138d876fdb5283cd1aa2a996c2bdf782e754e67 100644 (file)
@@ -602,9 +602,9 @@ function f.handle(self, state, data)
                        if has_radvd then
                                uci:commit("radvd")
                        end
--- the following line didn't work without admin-mini, for now i just replaced it with sys.exec... soma
---                     luci.http.redirect(luci.dispatcher.build_url(unpack(luci.dispatcher.context.requested.path), "system", "reboot") .. "?reboot=1")
-                       sys.exec("reboot")
+
+                       sys.exec("for s in network dnsmasq luci_splash firewall uhttpd olsrd radvd l2gvpn; do /etc/init.d/$s restart;done > /dev/null &")
+                       luci.http.redirect(luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "ffwizard"))
                end
                return false
        elseif state == FORM_INVALID then