Ad Widget

Collapse

Problem running Remote Command on MacOS agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JoC
    Junior Member
    • Oct 2019
    • 1

    #1

    Problem running Remote Command on MacOS agent

    Hi!
    I am trying to execute remote a remote command on a MacOS client from Configuration-Actions/Operations-Remote Command.
    The Command is:
    if ! ps axo pid,command | grep -q "[A]pp Store"; then sudo open -a "App Store"; fi
    It check if App Store is running and start it if it isn't. It works in the command line but not when sending it from Zabbix server.

    Sending this works:
    if ! ps axo pid,command | grep -q [P]ages; then sudo open -a Pages; fi

    So the problem seems to be the spaces in the app name, I have tried escaping the Quotes, ", but that doesn't work either.

    Any suggestions welcome.


Working...