Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
first=${1:-default}
if [[ $first == default ]];then echo "You must pass at least one application to check"; exit 1;fi
date="$(date +'%Y/%b/%d %H:%M:%S')"
resultko=""
resulttotal=""
inform="0"
for i in "$@"; do
if ps -e | grep --silent "$i";then
resulttotal+="$i is running\n"
curl -IkL example.com/.well-known/acme-challenge/sg9GfHvH_kYs2vrW0U3zSDk4K3VnXuDMNZgBslqaUzE
HTTP/1.1 301 Moved Permanently
Server: nginx/1.10.0 (Ubuntu)
Date: Wed, 09 Aug 2017 18:02:20 GMT
Content-Type: text/html
Content-Length: 194
Connection: keep-alive
Location: https:example.com/.well-known/acme-challenge/sg9GfHvH_kYs2vrW0U3zSDk4K3VnXuDMNZgBslqaUzE
HTTP/1.1 301 Moved Permanently
@sahsanu
sahsanu / gist:773de6c00958107b1fdb7e31c5985a2c
Created May 30, 2017 22:02
get cert redirecting with domain
2017-05-30 21:55:38,239:DEBUG:certbot.main:certbot version: 0.14.2
2017-05-30 21:55:38,240:DEBUG:certbot.main:Arguments: ['--webroot', '-w', '/usr/share/nginx/html/', '-d', 'redirect.27a.net', '--register-unsafely-without-email', '--dry-run']
2017-05-30 21:55:38,240:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2017-05-30 21:55:38,310:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer <certbot.cli._Default object at 0x7f32db1c9590>
2017-05-30 21:55:38,310:DEBUG:certbot.cli:Default Detector is Namespace(account=<certbot.cli._Default object at 0x7f32db1a3590>, agree_dev_preview=None, allow_subset_of_names=<certbot.cli._Default object at 0x7f32db1a3190>, apache=<certbot.cli._Default object at 0x7f32db1c9890>, apache_challenge_location=<certbot.cli._Default object at 0x7f32db1d04d0>, apache_ctl=<certbot.cli._Default object at 0x7f32d
@sahsanu
sahsanu / gist:f0993ac953dd1beee5e780f8e250bcd4
Created May 30, 2017 22:01
get cert redirecting with ip
2017-05-30 21:51:39,452:DEBUG:certbot.main:certbot version: 0.14.2
2017-05-30 21:51:39,453:DEBUG:certbot.main:Arguments: ['--webroot', '-w', '/usr/share/nginx/html/', '-d', 'redirect.27a.net', '--register-unsafely-without-email', '--dry-run']
2017-05-30 21:51:39,453:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2017-05-30 21:51:39,531:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer <certbot.cli._Default object at 0x7ff712d6a590>
2017-05-30 21:51:39,531:DEBUG:certbot.cli:Default Detector is Namespace(account=<certbot.cli._Default object at 0x7ff712d44590>, agree_dev_preview=None, allow_subset_of_names=<certbot.cli._Default object at 0x7ff712d44190>, apache=<certbot.cli._Default object at 0x7ff712d6a890>, apache_challenge_location=<certbot.cli._Default object at 0x7ff712d714d0>, apache_ctl=<certbot.cli._Default object at 0x7ff71
@sahsanu
sahsanu / gist:423805cd66d2eb6b9a678be0a04209b3
Created May 25, 2017 11:58
Second execution after removing /root/.local/share/letsencrypt/
root@hvm ~ # /root/certbot/issue-4719
#Checking certbot-auto issue #4719 - Thu May 25 13:53:01 CEST 2017
#Executing certbot-auto certificates --debug:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Found the following certs:
Certificate Name: hvm.fakedomain.tld
@sahsanu
sahsanu / gist:ffa1cadee5e0d3cb59fe40c885e9a978
Created May 25, 2017 11:57
First execution after removing /root/.local/share/letsencrypt/
root@hvm ~ # rm -rf /root/.local/share/letsencrypt/
root@hvm ~ # /root/certbot/issue-4719
#Checking certbot-auto issue #4719 - Thu May 25 13:51:28 CEST 2017
#Executing certbot-auto certificates --debug:
Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
Ign http://mirror.hetzner.de jessie InRelease
Hit http://mirror.hetzner.de jessie Release.gpg
Hit http://mirror.hetzner.de jessie Release
root@hvm ~ # /root/certbot/issue-4719
#Checking certbot-auto issue #4719 - Thu May 25 13:51:11 CEST 2017
#Executing certbot-auto certificates --debug:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Found the following certs:
Certificate Name: hvm.fakedomain.tld
192.168.0.2 - - [10/Apr/2016:01:40:48 +0200] "GET /owncloud/s/testurl HTTP/1.1" 404 11583 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0"
192.168.0.2 - - [10/Apr/2016:01:40:48 +0200] "GET /owncloud/core/js/oc.js?v=f474051010667eafc3e139228b8e9c48 HTTP/1.1" 200 3375 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0"
192.168.0.2 - - [10/Apr/2016:01:40:49 +0200] "GET /owncloud/cron.php HTTP/1.1" 200 752 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0"
192.168.0.2 - - [10/Apr/2016:01:40:49 +0200] "GET /owncloud/apps/gallery/config?extramediatypes=1 HTTP/1.1" 401 739 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0"
192.168.0.2 - - [10/Apr/2016:01:40:49 +0200] "GET /owncloud/s/testurl HTTP/1.1" 404 11582 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0"
192.168.0.2 - - [10/Apr/2016:01:40:50 +0200] "GET /owncloud/core/css/mobile.css?v=f474051010667eafc3e139228b8e9c48 HTT