blob: e74d01cb096a87a12347ad024a26ef356630f635 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
pre_install() {
tmpdir="/tmp"
instdir="/opt/Citrix/ICAClient"
configdir="${instdir}/config"
# If we already have citrix installed, we want to preserve the config files for the post_install question.
[ -e "${configdir}"/appsrv.ini ] && cp "${configdir}"/appsrv.ini ${tmpdir}/
[ -e "${configdir}"/wfclient.ini ] && cp "${configdir}"/wfclient.ini ${tmpdir}/
[ -e "${configdir}"/module.ini ] && cp "${configdir}"/module.ini ${tmpdir}/
}
post_install() {
instdir="/opt/Citrix/ICAClient"
tmpdir="/tmp"
nspluginwrapper -i /opt/Citrix/ICAClient/npica.so
echo "Should old the configuration files be taken into new build (y|N)?"
read choice
choice="`echo ${choice} | tr '[:upper:]' '[:lower:]'`"
#restore config files
if [[ "${choice}" == "y" ]]; then
echo "Copying old config files ..."
[ -e "${tmpdir}"/appsrv.ini ] && mv "${tmpdir}"/appsrv.ini "${instdir}"/config/ && echo " Copied 'appsrv.ini'"
[ -e "${tmpdir}"/wfclient.ini ] && mv "${tmpdir}"/wfclient.ini "${instdir}"/config/ && echo " Copied 'wfclient.ini'"
[ -e "${tmpdir}"/module.ini ] && mv "${tmpdir}"/module.ini "${instdir}"/config/ && echo " Copied 'module.ini'"
fi
chmod 666 "${instdir}"/config/{appsrv,wfclient,module}.ini
# symlink certificates
[ -d /usr/share/ca-certificates/mozilla ] && ln -s /usr/share/ca-certificates/mozilla/* ${instdir}/keystore/cacerts/ > /dev/null 2>&1
echo ""
echo "CA certs SymLinked for SSL support."
echo "All done."
echo -e "\e[1;31m\nYou have to create '\e[1;33m\$HOME/.ICAClient/cache\e[1;31m' for each user who uses this program and then populate it with the appropriate ini files. Copy paste the below to do this easily:\n"
echo -e "\e[1;37mmkdir -p \$HOME/.ICAClient/cache"
echo -e "cp ${instdir}/config/{All_Regions,Trusted_Region,Unknown_Region,canonicalization,regions}.ini \$HOME/.ICAClient/\n"
#echo -e "\e[1;37mFinally, set firefox to use the command '${firefox_command}' for .ICA files."
echo -e "\e[0m"
# add mimetype handler
update-desktop-database -q
}
pre_upgrade() { pre_install; }
post_upgrade() { post_install; }
|