applications/ffwizard: Check if services are executable before reloading them

This commit is contained in:
Manuel Munz 2011-01-20 13:44:01 +00:00
parent ad44fb2814
commit 4957eed8e8

View file

@ -603,7 +603,7 @@ function f.handle(self, state, data)
uci:commit("radvd") uci:commit("radvd")
end end
sys.exec("for s in network dnsmasq luci_splash firewall uhttpd olsrd radvd l2gvpn; do /etc/init.d/$s restart;done > /dev/null &") sys.exec("for s in network dnsmasq luci_splash firewall uhttpd olsrd radvd l2gvpn; do [ -x /etc/init.d/$s ] && /etc/init.d/$s restart;done > /dev/null &")
luci.http.redirect(luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "ffwizard")) luci.http.redirect(luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "ffwizard"))
end end
return false return false