mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2024-11-07 08:04:06 +01:00
Merge branch 'feature/KASM-4509_update_squid_adapter' into 'develop'
Resolve KASM-4509 "Feature/ update squid adapter" Closes KASM-4509 See merge request kasm-technologies/internal/workspaces-core-images!130
This commit is contained in:
commit
7122009ff0
@ -82,7 +82,7 @@ log_level: 5
|
||||
sasldb_path: /etc/sasl2/memcached-sasldb2
|
||||
EOL
|
||||
|
||||
KASM_SQUID_ADAPTER=https://kasmweb-build-artifacts.s3.amazonaws.com/kasm_squid_adapter/e46edd9bb45327359bc42f96cd2f299e23760904/kasm_squid_adapter_${ARCH}_develop.e46edd.tar.gz
|
||||
KASM_SQUID_ADAPTER=https://kasmweb-build-artifacts.s3.amazonaws.com/kasm_squid_adapter/079b5eea390e7a8bf7c4372fd108c10248cf65df/kasm_squid_adapter_${ARCH}_develop.079b5e.tar.gz
|
||||
|
||||
wget -qO- ${KASM_SQUID_ADAPTER} | tar xz -C /etc/squid/
|
||||
ls -la /etc/squid
|
||||
|
@ -4,7 +4,7 @@ set -ex
|
||||
{
|
||||
IP=$(ip route get 1.1.1.1 | grep -oP "src \\K\\S+")
|
||||
|
||||
mkdir /tmp/working_certs
|
||||
mkdir -p /tmp/working_certs
|
||||
cd /tmp/working_certs
|
||||
|
||||
if [ -f /etc/centos-release ]; then
|
||||
@ -29,11 +29,18 @@ set -ex
|
||||
CERT_FILE=/usr/local/share/ca-certificates/squid.crt
|
||||
fi
|
||||
CERT_NAME="Squid Root CA"
|
||||
openssl req -new -newkey rsa:2048 -sha256 -days 3650 -nodes -x509 -extensions v3_ca -subj "/C=US/ST=CA/O=Kasm Technologies/CN=kasm.localhost.net" -keyout myCA.pem -out myCA.pem
|
||||
openssl x509 -in myCA.pem -outform DER -out myCA.der
|
||||
openssl x509 -in myCA.pem -outform DER -out myCA.der
|
||||
cp myCA.pem ${CERT_FILE}
|
||||
cp myCA.pem /usr/local/squid/etc/ssl_cert/squid.pem
|
||||
|
||||
if [ ! -f "/usr/local/squid/etc/ssl_cert/squid.pem" ]; then
|
||||
echo "Generating Squid Cert"
|
||||
openssl req -new -newkey rsa:2048 -sha256 -days 3650 -nodes -x509 -extensions v3_ca -subj "/C=US/ST=CA/O=Kasm Technologies/CN=kasm.localhost.net" -keyout myCA.pem -out myCA.pem
|
||||
openssl x509 -in myCA.pem -outform DER -out myCA.der
|
||||
openssl x509 -in myCA.pem -outform DER -out myCA.der
|
||||
cp myCA.pem ${CERT_FILE}
|
||||
cp myCA.pem /usr/local/squid/etc/ssl_cert/squid.pem
|
||||
else
|
||||
cp /usr/local/squid/etc/ssl_cert/squid.pem ${CERT_FILE}
|
||||
fi
|
||||
|
||||
if [[ "${DISTRO}" == @(centos|oracle7|fedora) ]]; then
|
||||
update-ca-trust
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user