Add systemctl support, patch from « ganymede »

This commit is contained in:
Solene Rapenne 2020-12-30 17:36:08 +01:00
parent 409073df53
commit e220c32ba5
1 changed files with 5 additions and 2 deletions

View File

@ -28,8 +28,11 @@
(if (probe-file "/etc/portage/make.conf")
;; gentoo
(list "/sbin/rc-service" (getf params :name) "status")
;; other linux (this can be improved if needed)
(list "/usr/sbin/service" (getf params :name) "status"))))
;; most linux
(if (probe-file "/usr/sbin/service")
(list "/usr/sbin/service" (getf params :name) "status")
;; other linux with systemd only
(list "/usr/bin/systemctl" "status" (getf params :name))))))
(create-probe
pid-running