Sha256: 214d694c6eca1b8d56f19029333d75e0e3afcf05d446eaec8ced40b4cd017a2d

Contents?: true

Size: 709 Bytes

Versions: 5

Compression:

Stored size: 709 Bytes

Contents

#!/bin/bash

cert="$(dirname $0)/rootCA.crt"

function mac {
  sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain $cert
}

function linux {
  distribution=$(find /etc/*-release -type f | xargs cat | grep  'ID' | head -n1 | awk -F'=' '{gsub(/"/,"",$2); print tolower($2)}')
  echo $distribution
  case $distribution in 
    debian|ubuntu|linuxmint*|elementary*) 
      echo "hier"
      sudo cp $cert /usr/local/share/ca-certificates/richterrettich.crt
      sudo update-ca-certificates;;
    fedora|centos) 
      sudo cp $cert /etc/pki/ca-trust/source/anchors
      sudo update-ca-trust;;
  esac
}


case $OSTYPE in 
  darwin*) mac
    ;; 
  linux-gnu*) linux
    ;;
esac


Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dockersitter-0.8.1 lib/templates/install_certificate/add_ca.sh
dockersitter-0.8.0 lib/templates/install_certificate/add_ca.sh
dockersitter-0.7.0 lib/templates/install_certificate/add_ca.sh
dockersitter-0.6.0 lib/templates/install_certificate/add_ca.sh
dockersitter-0.5.0 lib/templates/install_certificate/add_ca.sh