Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Reboot script issue

$
0
0
Hi guys

I am troubleshooting a script that informs me when a system has rebooted.

The script is placed in /etc/rc3.d folder under root.
The script is as follows:

Code:


. /opt/scripts/function.sh
PATH=/usr/bin                           
EMAIL_ADD=<email address>     
#-------------------------------------------------------------------------------


echo "$WT_SYSTEM is rebooted" | mailx -s "SYSTEM is rebooted" $EMAIL_ADD


Func_SMS " SYSTEM is rebooted"

function.sh is used to send a sms to my cell number.

The problem I am facing is that when I execute the script like this : ./Script ,
it returns with the following error : syntax error at line 14: `}' unexpected

But when I rin it like : ksh -x Script , it works..... What is the issue here ?

Regards

Viewing all articles
Browse latest Browse all 16232

Trending Articles