Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/citrix/citrix-cron.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2696 by niro, Mon Sep 14 14:56:37 2015 UTC revision 2697 by niro, Wed Dec 16 13:50:20 2015 UTC
# Line 16  source ${MCORE_LIBDIR}/include/mysqlfunc Line 16  source ${MCORE_LIBDIR}/include/mysqlfunc
16    
17  export IMPORTED_IDS=""  export IMPORTED_IDS=""
18    
19    LOCKFILE="@@RUNDIR@@/citrix-cron.lock"
20    
21  is_not_an_import_id()  is_not_an_import_id()
22  {  {
23   local id="$1"   local id="$1"
# Line 32  is_not_an_import_id() Line 34  is_not_an_import_id()
34   return 0   return 0
35  }  }
36    
37    # the lockfile is not meant to be perfect, it's just in case the
38    # two cron scripts get run close to each other to keep
39    # them from stepping on each other's toes.
40    [[ -f ${LOCKFILE} ]] && exit 0
41    
42    trap "{ rm -f ${LOCKFILE}; exit 0; }" EXIT
43    touch ${LOCKFILE}
44    
45  # get default settings from configs  # get default settings from configs
46  [[ -z ${CITRIX_BROWSER} ]] && export CITRIX_BROWSER="${PNABROWSE_CITRIX_BROWSER}"  [[ -z ${CITRIX_BROWSER} ]] && export CITRIX_BROWSER="${PNABROWSE_CITRIX_BROWSER}"
47  [[ -z ${CITRIX_USER} ]] && export CITRIX_USER="${MCORE_CITRIX_USER}"  [[ -z ${CITRIX_USER} ]] && export CITRIX_USER="${MCORE_CITRIX_USER}"
# Line 86  do Line 96  do
96   mysqldo "update values_citrix_session set enabled='0' where id='${id}';"   mysqldo "update values_citrix_session set enabled='0' where id='${id}';"
97   fi   fi
98  done  done
99    
100    exit 0

Legend:
Removed from v.2696  
changed lines
  Added in v.2697