diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-07 11:56:54 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-07 11:56:54 +0000 |
commit | f44f7e591a16e2d9286b1c49f1ce95e2ba47555b (patch) | |
tree | 82f5b3fb88f319150c1d9bf61a593751011580a9 /rc.c | |
parent | cb086d6a96f84e16e2daea08af5ecc5148e9715e (diff) | |
download | lua-openrc-f44f7e591a16e2d9286b1c49f1ce95e2ba47555b.tar.bz2 lua-openrc-f44f7e591a16e2d9286b1c49f1ce95e2ba47555b.tar.xz |
implemented service_daemons_crashed()
Diffstat (limited to 'rc.c')
-rw-r--r-- | rc.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -209,7 +209,13 @@ static int Pservices_scheduled(lua_State *L) return 1; } - +/** service_daemons_crashed(service) - Checks that all daemons started with start-stop-daemon by the service are still running. */ +static int Pservice_daemons_crashed(lua_State *L) +{ + const char *service = luaL_checkstring(L, 1); + lua_pushboolean(L, rc_service_daemons_crashed(service)); + return 1; +} static const luaL_reg R[] = { @@ -229,6 +235,7 @@ static const luaL_reg R[] = {"services_in_runlevel_stacked",Pservices_in_runlevel_stacked}, {"services_in_state", Pservices_in_state}, {"services_scheduled", Pservices_scheduled}, + {"service_daemons_crashed", Pservice_daemons_crashed}, {NULL, NULL} }; |