mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-14 18:57:20 -07:00
Merge 164ce485eb
into 34ca6fec92
This commit is contained in:
commit
be0b44c69c
1 changed files with 11 additions and 1 deletions
|
@ -24,7 +24,17 @@ __services_detail() {
|
|||
}
|
||||
|
||||
service_running() {
|
||||
if [ -f "/etc/init/$1.conf" ]; then
|
||||
if [ -f "/sbin/service" ]; then
|
||||
# Use systemd
|
||||
case "$(/sbin/service $1 status 2>/dev/null)" in
|
||||
*running*)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
false
|
||||
;;
|
||||
esac
|
||||
elif [ -f "/etc/init/$1.conf" ]; then
|
||||
# Use upstart
|
||||
case "$(status $1 2>/dev/null)" in
|
||||
*running*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue