From 6e5c55b0bf7b69ef9ddfc0de507e3ea2dbcebd53 Mon Sep 17 00:00:00 2001 From: zeus Date: Mon, 25 Jan 2021 01:38:18 +0100 Subject: [PATCH] instantcert and kill_zombies --- bash/instantcert.sh | 5 +++++ bash/kill_zombies.sh | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 bash/instantcert.sh create mode 100644 bash/kill_zombies.sh diff --git a/bash/instantcert.sh b/bash/instantcert.sh new file mode 100644 index 0000000..a62a95f --- /dev/null +++ b/bash/instantcert.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# http://www.akadia.com/services/ssh_test_certificate.html +# create and sign openssl-cert +openssl genrsa -des3 -out server.key 1024 && openssl req -new -key server.key -out server.csr && cp server.key server.key.org && openssl rsa -in server.key.org -out server.key && openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt + diff --git a/bash/kill_zombies.sh b/bash/kill_zombies.sh new file mode 100644 index 0000000..57f0ad5 --- /dev/null +++ b/bash/kill_zombies.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# killing zombies if possible +kill -HUP `ps -A -ostat,ppid,pid,cmd | grep -e '^[Zz]' | awk '{print $2}'`; kill -TERM `ps -A -ostat,ppid,pid,cmd | grep -e '^[Zz]' | awk '{print $2}'`