Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. cd /home/sether/TeamSpeak3/
  4. cd "$(dirname "${BASH_SOURCE[0]}")"
  5.  
  6. #If the bundled openssl is used, the app needs to find out where the CA certs
  7. #are located. This needs to be done with the help of openssl installed on the
  8. #system, before we include "." in the LD_LIBRARY_PATH.
  9.  
  10. #First test if the bundled libssl is used
  11. #If bundeled libssl is used and SSL_CERT_FILE and SSL_CERT_DIR are not already set.
  12. if [ -f "./libssl.so.1.0.0" -a -x "$(command -v openssl)" -a -z "${SSL_CERT_FILE+x}" -a -z "${SSL_CERT_DIR+x}" ]
  13. then
  14. #Set them to sane defaults.
  15.  
  16. #Get ssl dir according to system openssl
  17. OPENSSL_DIR=`openssl version -d | grep -Po '(?<=\").*(?=\")'`
  18.  
  19. #Is cert.pem located there?
  20. if [ -f "${OPENSSL_DIR}/cert.pem" ]
  21. then
  22. #Use this file
  23. export SSL_CERT_FILE=${OPENSSL_DIR}/cert.pem
  24.  
  25. #Is certs dir located there?
  26. elif [ -d "${OPENSSL_DIR}/certs" ]
  27. then
  28. #Use this dir
  29. export SSL_CERT_DIR=${OPENSSL_DIR}/certs
  30. else
  31. #An unknown configuration was found. Or openssl/ca certificates were not
  32. #installed
  33. echo "Could not find CA certificates location"
  34. exit 3
  35. fi
  36. fi
  37.  
  38. export KDEDIRS=
  39. export KDEDIR=
  40. export QTDIR=.
  41. export QT_PLUGIN_PATH=.
  42. export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"
  43.  
  44. if [ -e ts3client_linux_x86 ]; then
  45. ./ts3client_linux_x86 $@
  46. else
  47. ./ts3client_linux_amd64 $@
  48. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement