summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-07-05 12:38:01 +0200
committerJo-Philipp Wich <jo@mein.io>2019-07-07 15:36:24 +0200
commitc7a9900c8734f19e34af5bd4a4106566d4ca3ca1 (patch)
tree4070cc3873bbc5bd7d84e32ddacf41c9f7d0f5e5
parent6665a1d78c3b08808f30977e4d67ea26e6fc4895 (diff)
luci-base: add sys.init.reload() and sys.init.restart() actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--modules/luci-base/luasrc/sys.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/sys.lua b/modules/luci-base/luasrc/sys.lua
index cd186c94d2..d0df275724 100644
--- a/modules/luci-base/luasrc/sys.lua
+++ b/modules/luci-base/luasrc/sys.lua
@@ -659,3 +659,11 @@ end
function init.stop(name)
return (init_action("stop", name) == 0)
end
+
+function init.restart(name)
+ return (init_action("restart", name) == 0)
+end
+
+function init.reload(name)
+ return (init_action("reload", name) == 0)
+end