Contents of /mcore-src/trunk/mcore-tools/src/modules/citrix/launch-ica.in
Parent Directory | Revision Log
Revision 2789 -
(show annotations)
(download)
Thu Mar 24 09:40:59 2016 UTC (8 years, 2 months ago) by niro
File size: 610 byte(s)
Thu Mar 24 09:40:59 2016 UTC (8 years, 2 months ago) by niro
File size: 610 byte(s)
-don't allow to run more than one instance of an ICA session at the same time
1 | #!/bin/bash |
2 | |
3 | source @@SYSCONFDIR@@/mcore/citrix.conf |
4 | |
5 | ICA="$1" |
6 | |
7 | die() { echo "ERROR: $@"; exit 1; } |
8 | |
9 | [[ -n ${ICA} ]] || die "No ICA given" |
10 | [[ -f ${ICA} ]] || die "No ICA does not exist" |
11 | |
12 | if [[ -z ${ICAROOT} ]] |
13 | then |
14 | export ICAROOT="${SYSTEM_ICAROOT}" |
15 | fi |
16 | |
17 | # create required citrix runtime with an accepted eula |
18 | install -d ~/.ICAClient |
19 | touch ~/.ICAClient/.eula_accepted |
20 | |
21 | # don't allow to run more than one instance of an ICA session at the same time |
22 | if [[ -z $(ps aux | grep "wf[iI]ca ${ICA}") ]] |
23 | then |
24 | wfica "${ICA}" || die "Could not launch '${ICA}'" |
25 | else |
26 | echo "Session '${ICA}' already runnning." |
27 | exit 3 |
28 | fi |