This function is supposed to receive a variable $CON and start a service. I tested it and so I know the function is processing the $CON variable however, when I check the service, it was still down. If run the last line in the function by itself in commandline, it starts the service fine. Do I need to enclose the commands below in ticks or quotes ..
restart_con()
{
cd /nfs/informatica_pwx/logs/$CON/condenser/
rm -rf nohup.out
nohup pwxccl cs=pwxccl_$CON.cfg config=/nfs/informatica_pwx/logs/$CON/listener/$CON_dbmover.cfg &
# below echo's the variable passed in successfully
echo $CON
}
restart_con()
{
cd /nfs/informatica_pwx/logs/$CON/condenser/
rm -rf nohup.out
nohup pwxccl cs=pwxccl_$CON.cfg config=/nfs/informatica_pwx/logs/$CON/listener/$CON_dbmover.cfg &
# below echo's the variable passed in successfully
echo $CON
}