An ubus RPC daemon for Liminix
Find a file
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
include/rpcd rc: new ubus object for handling /etc/init.d/ scripts 2020-09-10 13:18:09 +02:00
CMakeLists.txt rc: new ubus object for handling /etc/init.d/ scripts 2020-09-10 13:18:09 +02:00
exec.c exec: always call finish_cb to allow plugin to free up memory 2019-10-29 09:24:46 +01:00
file.c file: extend exec acl checks to commands with arguments 2019-12-11 09:13:05 +01:00
iwinfo.c iwinfo: add current hw and ht mode to info call 2020-01-05 19:56:34 +01:00
main.c rc: new ubus object for handling /etc/init.d/ scripts 2020-09-10 13:18:09 +02:00
plugin.c plugin: avoid truncating numeric values 2019-11-10 21:26:51 +01:00
rc.c rc: new ubus object for handling /etc/init.d/ scripts 2020-09-10 13:18:09 +02:00
session.c session: deny access if password login is disabled 2020-03-17 19:33:35 +01:00
sys.c sys: fix symbol redeclaration 2019-09-04 15:51:39 +02:00
uci.c uci: reset uci_ptr flags when merging options during section add 2020-05-26 16:00:34 +02:00
unauthenticated.json session: setup a persistent NULL section and implement login procedure 2013-09-10 19:56:36 +02:00