Sfoglia il codice sorgente

Merge pull request #1 from synner1/patch-1

changed serveradmin check to satisfy all OS X versions
Jon Schipp 12 anni fa
parent
commit
e4d254bbbc
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      check_service.sh

+ 1 - 1
check_service.sh

@@ -90,7 +90,7 @@ if [[ $OS == freebsd ]]; then
 fi
 
 if [[ $OS == osx ]]; then
-        if [ -f /usr/sbin/serveradmin >/dev/null 2>&1 ] && serveradmin list | grep "$SERVICE" 2>&1 >/dev/null; then
+        if command -v serveradmin >/dev/null 2>&1 && serveradmin list | grep "$SERVICE" 2>&1 >/dev/null; then
                 SERVICETOOL="serveradmin status $SERVICE"
                 LISTTOOL="serveradmin list"
         elif command -v launchctl >/dev/null 2>&1; then