Magellan Linux

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

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

revision 2697 by niro, Wed Dec 16 13:50:20 2015 UTC revision 2821 by niro, Fri Jul 28 09:55:58 2017 UTC
# Line 48  touch ${LOCKFILE} Line 48  touch ${LOCKFILE}
48  [[ -z ${STOREFRONT_PASS} ]] && export STOREFRONT_PASS="${MCORE_STOREFRONT_PASS}"  [[ -z ${STOREFRONT_PASS} ]] && export STOREFRONT_PASS="${MCORE_STOREFRONT_PASS}"
49  [[ -z ${STOREFRONT_DOMAIN} ]] && export STOREFRONT_DOMAIN="${MCORE_STOREFRONT_DOMAIN}"  [[ -z ${STOREFRONT_DOMAIN} ]] && export STOREFRONT_DOMAIN="${MCORE_STOREFRONT_DOMAIN}"
50    
51  if ! storebrowse &> /dev/null  # register eula and add default store as MCORE_UNPRIV_USER
52  then  ${MCORE_LIBDIR}/storefront-store --add --store ${STOREFRONT_STORE}
53   if [ -d ~/.ICAClient ]  ${MCORE_LIBDIR}/storefront-store --regen
  then  
  rm -r ~/.ICAClient  
  fi  
   
  install -d ~/.ICAClient  
  touch ~/.ICAClient/.eula_accepted  
   
  # kill running instances  
  pidof AuthManagerDaemon > /dev/null && killall AuthManagerDaemon  
  pidof ServiceRecord > /dev/null && killall ServiceRecord  
  pidof storebrowse > /dev/null && killall storebrowse  
   
  # register eula and add default store  
  xvfb-run -a -s "-extension RANDR" storebrowse -a "${STOREFRONT_STORE}" > /dev/null  
 fi  
54    
55  # get all sessions  # get all sessions
56  if [[ -z $(storebrowse -l | grep -i ${STOREFRONT_STORE}) ]]  if [[ -z $(su - ${MCORE_UNPRIV_USER} -c "storebrowse -l" | grep -i ${STOREFRONT_STORE}) ]]
57  then  then
58   echo "Store ${STOREFRONT_STORE} unknown, perhaps not added. Run 'rm -r ~/.ICAClient'."   echo "Store ${STOREFRONT_STORE} unknown, perhaps not added. Run 'rm -r ~/.ICAClient'."
59  else  else
# Line 76  else Line 61  else
61   [[ -n ${STOREFRONT_USER} ]] && OPT+=" -U ${STOREFRONT_USER}"   [[ -n ${STOREFRONT_USER} ]] && OPT+=" -U ${STOREFRONT_USER}"
62   [[ -n ${STOREFRONT_PASS} ]] && OPT+=" -P ${STOREFRONT_PASS}"   [[ -n ${STOREFRONT_PASS} ]] && OPT+=" -P ${STOREFRONT_PASS}"
63   [[ -n ${STOREFRONT_DOMAIN} ]] && OPT+=" -D ${STOREFRONT_DOMAIN}"   [[ -n ${STOREFRONT_DOMAIN} ]] && OPT+=" -D ${STOREFRONT_DOMAIN}"
64   SESSION_LIST=$(storebrowse -E ${OPT} ${STOREFRONT_STORE} 2> /dev/null)   SESSION_LIST=$(su - ${MCORE_UNPRIV_USER} -c "storebrowse -E ${OPT} ${STOREFRONT_STORE}" 2> /dev/null)
65   if [[ $? != 0 ]]   if [[ $? != 0 ]]
66   then   then
67   echo "could not retrieve session list"   echo "could not retrieve session list"

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