bostonmacosx
Newcomer
- Joined
- Dec 19, 2014
- Messages
- 1
- Reaction score
- 0
- Points
- 0
So I have:
Even if I change the password so that it fails on login I still get a "0" for the return value.
So I can't send out a failure email.
How can I get around this?
Thanks
Code:
dsmadmc -se=$i -id=XXXX -pa=XXX -errorlogname=/tmp/tsmerror.log -outfile=/METRICS/BACKUP/FILES/$filename.txt -tabdelimited 'select domain_name, schedule_name, node_name,substr(char(scheduled_start), 1, 16) as "SCHEDULED_START",substr(char(actual_start), 1, 16) as "ACTUAL_START",status, result, reason from events where (scheduled_start between '"'"$yesterdaytime"'"' and '"'"$nowtime"'"') and LENGTH(domain_name) IS NOT NULL order by scheduled_start,status,result,reason'
if [ "$?" = "0" ]; then
echo 'success';
else
echo 'failure';
echo $? | mail -s "DSMADMC DAILY TRANSFER QUERY ERROR: $i" [email protected]
fi
Even if I change the password so that it fails on login I still get a "0" for the return value.
So I can't send out a failure email.
How can I get around this?
Thanks