rpcd/include/rpcd
Rafał Miłecki 646daa0bec rc: new ubus object for handling /etc/init.d/ scripts
This commit adds "rc" ubus object with methods "list" and "exec" for
listing and calling init.d script appropriately. It's useful for all
kind of UIs (e.g. LuCI) and custom apps.

Example:
root@OpenWrt:~# ubus call rc list
{
	"blockd": {
		"start": 80,
		"enabled": true,
		"running": true
	},
	"dnsmasq": {
		"start": 19,
		"enabled": true,
		"running": true
	}
}
root@OpenWrt:~# ubus call rc init '{ "name": "blockd", "action": "disable" }'
root@OpenWrt:~# ubus call rc init '{ "name": "dnsmasq", "action": "stop" }'
root@OpenWrt:~# ubus call rc list
{
	"blockd": {
		"start": 80,
		"enabled": false,
		"running": true
	},
	"dnsmasq": {
		"start": 19,
		"enabled": true,
		"running": false
	}
}

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Jo-Philipp Wich <jo@mein.io>
2020-09-10 13:18:09 +02:00
..
exec.h treewide: rename exec_timeout to rpc_exec_timeout 2018-11-28 12:07:58 +01:00
plugin.h plugin: store pointer to exec timeout value in the ops structure 2018-11-28 12:10:40 +01:00
rc.h rc: new ubus object for handling /etc/init.d/ scripts 2020-09-10 13:18:09 +02:00
session.h session: support reclaiming pending apply session 2018-03-15 12:29:15 +01:00
uci.h Extend copyright 2014-01-12 12:48:58 +00:00