mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-15 00:50:25 +02:00
60d6734e1f
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.