mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
The openwrt version in old GL-inet devices do not support checking status using /etc/init.d/<service_name>, so the sysV wrapping trick won't work. Instead, we need to parse "ps" command output to check whether ctrld process is running or not. While at it, making newService as a wrapper of service.New function, prevent the caller from calling the latter without following call to the former, causing mismatch in service operations.