bug fix: template and script

template using service status value map.
Currently script setting hard coded SGE_ROOT.