From ebaa36faa8d4b5add7029c3306b605142d4bcc36 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Wed, 9 Apr 2014 09:17:13 +0200 Subject: [PATCH] better check for services using OpenSSL --- libssl-restart-daemons.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libssl-restart-daemons.sh b/libssl-restart-daemons.sh index c8edd5e..822d90a 100755 --- a/libssl-restart-daemons.sh +++ b/libssl-restart-daemons.sh @@ -5,4 +5,7 @@ # Shows all applications using libssl # They need to be restarted after an OpenSSL upgrade -for lib in $(dpkg -L libssl1.0.0 | egrep "(libcrypto\.so|libssl\.so)"); do lsof -R +c 15 / | grep "$lib"; done | awk {'if ($3==1) print $1'} | sort | uniq +#for lib in $(dpkg -L libssl1.0.0 | egrep "(libcrypto\.so|libssl\.so)"); do lsof -R +c 15 / | grep "$lib"; done | awk {'if ($3==1) print $1'} | sort | uniq + +# Snippet by Yves-Alexis Perez: http://www.corsac.net/?rub=blog&post=1565 +grep -l 'libssl.*deleted' /proc/*/maps | tr -cd 0-9\\n | xargs -r ps u