i've got a similar problem in a crontab to restart a process:
#! /bin/bash -f
ps -ax |grep iRed2 |grep -v grep > /dev/null
if [ "$?" != "0" ]; then
/usr/bin/osascript -so -e "tell application "iRed2" to activate"
echo "ired restarted"
fi
but i often get this error from osascript:
2024-05-30 13:40:01.932 osascript[14166:136122] Error loading /Library/QuickTime/EyeTV MPEG Support.component/Contents/MacOS/EyeTV MPEG Support: dlopen(/Library/QuickTime/EyeTV MPEG Support.component/Contents/MacOS/EyeTV MPEG Support, 0x0106): code signature in (/Library/QuickTime/EyeTV MPEG Support.component/Contents/MacOS/EyeTV MPEG Support) not valid for use in process: mapping process is a platform binary, but mapped file is not
but afaik iRed2 has no connection to EyeTV, other than being referenced in many of iRed2's applescripts...wtf???
otherwise iRed2 starts up fine...other than having to be restarted, another wtf...