AFP548

Sript not working from the crontab

Hello, I'm trying to make this script working on a OSX 10.4 box. [code]#!/bin/bash VERIF=`ps aux | grep someapp.app | grep -v grep | wc -l` #VERIF=`ps aux | grep someapp.app` if [ $VERIF -eq 0 ] then echo "App restart ..\n\n$VERIF" | mail -s "App restart on $HOSTNAME" my@email.com open /Applications/someapp.app fi [/code] This script works when I call it manually but $VERIF return nothing when it's called from the crontab (so the condition always returns true). I often use this kind of scripts on Linux box without any problems... Any idea what's wrong with this little script ? Thanks !
Exit mobile version