github.com/influxdata/telegraf@v1.30.3/scripts/telegraf_entry_mac (about)

     1  #!/bin/bash
     2  currentDir="$( cd "$(dirname "$0")" ; pwd -P )"
     3  
     4  if [[ $currentDir == *"AppTranslocation"* || $currentDir == *"Volumes"* ]]; then
     5    osascript -e "display alert \"Please copy Telegraf to somewhere on your machine. It can't be run from the image.\" as critical"
     6  else
     7    cd $currentDir
     8    osascript<<EOF
     9    tell application "Terminal"
    10        do script " $currentDir/../Resources/usr/bin/telegraf $@"
    11    end tell
    12  EOF
    13  fi