Skip to content

Instantly share code, notes, and snippets.

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

  • Save mkdynamic/f158778f254f5454eee5 to your computer and use it in GitHub Desktop.

Select an option

Save mkdynamic/f158778f254f5454eee5 to your computer and use it in GitHub Desktop.

Revisions

  1. mkdynamic revised this gist Mar 19, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion openssl.sh
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ awk=$(which awk || echo 'missing: install awk' && exit 1)
    sudo apt-get update

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

    # bounce ssl using services
    sudo lsof -n | grep ssl | grep deleted | $awk '{print $1}' | uniq | xargs -t -I X sudo service X restart
  2. mkdynamic revised this gist Mar 19, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions openssl.sh
    Original file line number Diff line number Diff line change
    @@ -13,3 +13,6 @@ sudo lsof -n | grep ssl | grep deleted | $awk '{print $1}' | uniq | xargs -t -I

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

    # restart unicorn
    /etc/init.d/unicorn upgrade
  3. @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
  4. @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