Skip to content

Instantly share code, notes, and snippets.

@statianzo
Forked from colby/openssl.sh
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save statianzo/61f1024e9e54d1914726 to your computer and use it in GitHub Desktop.

Select an option

Save statianzo/61f1024e9e54d1914726 to your computer and use it in GitHub Desktop.

Revisions

  1. @colby colby revised this gist Mar 19, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions openssl.sh
    Original file line number Diff line number Diff line change
    @@ -3,13 +3,13 @@
    awk=$(which awk || echo 'missing: install awk' && exit 1)

    # update apt
    sudo apt-get update > /dev/null
    sudo apt-get update

    # get ssl related packages from simulated upgrade
    sudo apt-get upgrade -s | grep ssl | grep Inst | $awk '{print $2}' | xargs sudo apt-get install
    sudo apt-get upgrade -s | grep ssl | grep Inst | $awk '{print $2}' | xargs -t sudo apt-get install

    # bounce ssl using services
    sudo lsof -n | grep ssl | grep deleted | $awk '{print $1}' | uniq | xargs -I X sudo service X restart
    sudo lsof -n | grep ssl | grep deleted | $awk '{print $1}' | uniq | xargs -t -I X sudo service X restart

    # should now return nothing
    sudo lsof -n | grep ssl
    sudo lsof -n | grep ssl | grep deleted
  2. @colby colby created this gist Mar 19, 2015.
    15 changes: 15 additions & 0 deletions openssl.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/bash

    awk=$(which awk || echo 'missing: install awk' && exit 1)

    # update apt
    sudo apt-get update > /dev/null

    # get ssl related packages from simulated upgrade
    sudo apt-get upgrade -s | grep ssl | grep Inst | $awk '{print $2}' | xargs sudo apt-get install

    # bounce ssl using services
    sudo lsof -n | grep ssl | grep deleted | $awk '{print $1}' | uniq | xargs -I X sudo service X restart

    # should now return nothing
    sudo lsof -n | grep ssl