Skip to content

Instantly share code, notes, and snippets.

@mkdynamic
Forked from statianzo/openssl.sh
Created March 19, 2015 23:43
Show Gist options
  • Save mkdynamic/4b0488dfb6669eb82f20 to your computer and use it in GitHub Desktop.
Save mkdynamic/4b0488dfb6669eb82f20 to your computer and use it in GitHub Desktop.
#!/bin/bash
awk=$(which awk || echo 'missing: install awk' && exit 1)
# update apt
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 -y install
# bounce ssl using services
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 | grep deleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment