summaryrefslogtreecommitdiff
path: root/main.c
Commit message (Collapse)AuthorAgeFilesLines
* rc: new ubus object for handling /etc/init.d/ scriptsRafał Miłecki2020-09-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* main: exec_self: make clang analyzer happyYousong Zhou2019-10-291-3/+8
| | | | | | | | | Prevent a theoretical leak of the args memory when the executable path cannot be found. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> [fix whitespace, commit description] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* treewide: rename exec_timeout to rpc_exec_timeoutJo-Philipp Wich2018-11-281-3/+3
| | | | | | Rename the extern int to denote a global symbol. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* main: fix logic bug when not specifying a timeout optionJo-Philipp Wich2018-11-221-4/+2
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* exec: increase maximum execution time to 120sJo-Philipp Wich2018-11-221-1/+16
| | | | | | | Increase the maximum possible execution time to 120 seconds and add a new command line flag `-t` which allows overwriting the default value. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* paths: substitute literal with macroJavier Domingo Cansino2015-11-201-2/+2
| | | | Signed-off-by: Javier Domingo Cansino <javierdo1@gmail.com>
* Extend copyrightJo-Philipp Wich2014-01-121-1/+1
|
* Set umask to 0077 on daemon startup to prevent libuci from making ↵Jo-Philipp Wich2013-09-051-0/+2
| | | | world-readable directories
* Use common /var/run/rpcd base directory to store runtime informationJo-Philipp Wich2013-09-051-0/+5
|
* main: only purge uci savedirs if not reloadingJo-Philipp Wich2013-09-051-1/+8
|
* main: store session data to disk on receipt of SIGUSR1 or SIGHUP. On HUP ↵Jo-Philipp Wich2013-09-051-3/+33
| | | | terminate self and re-exec
* Move includes into subdirectoryJo-Philipp Wich2013-09-041-3/+3
|
* Rename from "luci-rpcd" to "rpcd"Jo-Philipp Wich2013-09-021-1/+1
|
* luci2: convert to plugin libraryJo-Philipp Wich2013-09-021-2/+0
|
* file: convert to plugin libraryJo-Philipp Wich2013-09-021-2/+0
|
* iwinfo: convert to plugin libraryJo-Philipp Wich2013-09-021-2/+0
|
* Add initial plugin api supportJo-Philipp Wich2013-08-301-0/+2
|
* Add luci2 namespace to offer various backend methods required by the uiJo-Philipp Wich2013-06-111-0/+2
|
* Remove system namespace support again, the code has been merged into procd ↵Jo-Philipp Wich2013-06-041-2/+0
| | | | | | instead. This reverts commit e5c9b0411d7ebc03a9edbdd3a7809f0e0bdb38dd.
* Add system namespace which offers various system information like software ↵Jo-Philipp Wich2013-05-301-0/+2
| | | | release, memory and swap info, uptime and load
* add ubus iwinfo api (lacks scanning, assoclist, countrylist and txpowerlist yet)Jo-Philipp Wich2013-02-021-0/+2
|
* add ubus uci apiJo-Philipp Wich2013-02-021-0/+2
|
* file: add exec method, rework read methodJo-Philipp Wich2013-01-311-0/+3
|
* initial commitJo-Philipp Wich2013-01-261-0/+66