Magellan Linux

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

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

revision 2393 by niro, Thu Aug 27 08:15:48 2015 UTC revision 2642 by niro, Thu Oct 8 10:23:56 2015 UTC
# Line 16  print_storefront_session_list() Line 16  print_storefront_session_list()
16   declare -i counter=0   declare -i counter=0
17   x11runas "${MCORE_LIBDIR}/storefront-resolver --enumerate --user '${user}' --password '${password}' --domain '${domain}'" | while read line   x11runas "${MCORE_LIBDIR}/storefront-resolver --enumerate --user '${user}' --password '${password}' --domain '${domain}'" | while read line
18   do   do
19   [[ ${counter} -gt 0 ]] && "${line}" | cut -d"'" -f1-3   [[ ${counter} -gt 0 ]] && echo "${line}" | cut -d"'" -f1-3
20   ((counter++))   ((counter++))
21   done   done
22  }  }
# Line 31  do Line 31  do
31   --user) shift; user="$1" ;;   --user) shift; user="$1" ;;
32   --domain) shift; domain="$1" ;;   --domain) shift; domain="$1" ;;
33   --password) shift; password="$1" ;;   --password) shift; password="$1" ;;
34     --store) shift; store="$1" ;;
35     --autostart) shift; autostart="$1" ;;
36   esac   esac
37   shift   shift
38  done  done
39    
40  [[ -n ${method} ]] || die "No method given"  [[ -n ${method} ]] || die "No method given"
41    [[ -n ${autostart} ]] || autostart=0
42    
43  case "${method}" in  case "${method}" in
44   add)   add)
# Line 44  case "${method}" in Line 47  case "${method}" in
47   # and session   # and session
48   [[ -n ${session} ]] || die "No session given"   [[ -n ${session} ]] || die "No session given"
49    
50     # add store and regen user xml
51     if [[ -n ${store} ]]
52     then
53     ${MCORE_LIBDIR}/storefront-store --add --store "${store}"
54     ${MCORE_LIBDIR}/storefront-store --regen
55     fi
56    
57   storefront_starter="${STOREFRONTDIR}/${name}.sh"   storefront_starter="${STOREFRONTDIR}/${name}.sh"
58   CONFIG="${MROOT}/${storefront_starter}"   CONFIG="${MROOT}/${storefront_starter}"
59   clearconfig   clearconfig
60    
61   addconfig '#!/bin/bash'   addconfig '#!/bin/bash'
62   addconfig "${MCORE_LIBDIR}/storefront-resolver --launch --user '${user}' --password '${password}' --domain '${domain}' --app '${session}'"   addconfig "${MCORE_LIBDIR}/storefront-resolver --launch --user '${user}' --password '${password}' --domain '${domain}' --app '${session}' --store '${store}'"
63   chmod +x "${storefront_starter}"   chmod +x "${storefront_starter}"
64    
65   if is_provided fluxbox   if is_provided fluxbox
# Line 57  case "${method}" in Line 67  case "${method}" in
67   # generate fluxbox menu entry   # generate fluxbox menu entry
68   ${MCORE_LIBDIR}/fluxbox-menuitem --add --name "${name}" --exec "${storefront_starter}" &&   ${MCORE_LIBDIR}/fluxbox-menuitem --add --name "${name}" --exec "${storefront_starter}" &&
69   ${MCORE_LIBDIR}/fluxbox-rebuild-menu   ${MCORE_LIBDIR}/fluxbox-rebuild-menu
70     # add autostart
71     if [[ ${autostart} = 1 ]]
72     then
73     ${MCORE_LIBDIR}/fluxbox-autostart --add --name "${name}" --exec "${storefront_starter}" &&
74     ${MCORE_LIBDIR}/fluxbox-rebuild-autostart
75     fi
76   fi   fi
77   if is_provided idesk   if is_provided idesk
78   then   then
# Line 75  case "${method}" in Line 91  case "${method}" in
91   then   then
92   ${MCORE_LIBDIR}/fluxbox-menuitem --del  --name "${name}" &&   ${MCORE_LIBDIR}/fluxbox-menuitem --del  --name "${name}" &&
93   ${MCORE_LIBDIR}/fluxbox-rebuild-menu   ${MCORE_LIBDIR}/fluxbox-rebuild-menu
94     ${MCORE_LIBDIR}/fluxbox-autostart --del  --name "${name}" &&
95     ${MCORE_LIBDIR}/fluxbox-rebuild-autostart
96   fi   fi
97   if is_provided idesk   if is_provided idesk
98   then   then
# Line 87  case "${method}" in Line 105  case "${method}" in
105   ;;   ;;
106    
107   print)   print)
108   list_files_in_directory ${MROOT}/${STOREFRONTDIR} | sed 's:\.sh:g'   list_files_in_directory ${MROOT}/${STOREFRONTDIR} | sed 's:\.sh::g'
109   ;;   ;;
110    
111   query)   query)

Legend:
Removed from v.2393  
changed lines
  Added in v.2642