{"action":"closed","issue":{"url":"https://api.github.com/repos/AlternC/alternc-certbot/issues/12","repository_url":"https://api.github.com/repos/AlternC/alternc-certbot","labels_url":"https://api.github.com/repos/AlternC/alternc-certbot/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/AlternC/alternc-certbot/issues/12/comments","events_url":"https://api.github.com/repos/AlternC/alternc-certbot/issues/12/events","html_url":"https://github.com/AlternC/alternc-certbot/issues/12","id":275170009,"node_id":"MDU6SXNzdWUyNzUxNzAwMDk=","number":12,"title":"Ne faire de requette de création de certificat uniquement si le domaine est fonctionnel","user":{"login":"soul9","id":175965,"node_id":"MDQ6VXNlcjE3NTk2NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/175965?v=4","gravatar_id":"","url":"https://api.github.com/users/soul9","html_url":"https://github.com/soul9","followers_url":"https://api.github.com/users/soul9/followers","following_url":"https://api.github.com/users/soul9/following{/other_user}","gists_url":"https://api.github.com/users/soul9/gists{/gist_id}","starred_url":"https://api.github.com/users/soul9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soul9/subscriptions","organizations_url":"https://api.github.com/users/soul9/orgs","repos_url":"https://api.github.com/users/soul9/repos","events_url":"https://api.github.com/users/soul9/events{/privacy}","received_events_url":"https://api.github.com/users/soul9/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-11-19T16:04:08Z","updated_at":"2018-06-22T16:45:41Z","closed_at":"2018-06-22T16:45:41Z","author_association":"NONE","body":"J'ai du faire ca car on a plein de comptes zombies sur notre hébergement, et le script a l'air de vouloir créer des certificats pour tout domaine, meme les domaines TXT etc.\r\nDonc j'ai diverti /usr/bin/certbot avec dpkg vers /usr/bin/certbot.orig et créé un script /usr/bin/certbot avec grosso modo ca:\r\n```bash\r\n#!/bin/bash\r\ndomain=$(echo \"$@\" |sed -r \"s,.*-d ([^ ]+).*,\\1,g\")\r\n\r\nTMPDIR=/var/lib/letsencrypt/.well-known/acme-challenge/\r\nmkdir -p $TMPDIR\r\ntmp=$(mktemp --tmpdir=$TMPDIR)\r\n\r\necho $RANDOM > $tmp\r\nchmod o+r $tmp\r\n# Validate domain, if it is non functional, exit \r\nif [ \"$(wget --timeout=1 --tries=1 -O - -q http://$domain/.well-known/acme-challenge/$(basename $tmp) |tr -d '\\n')\" != \"$(cat $tmp |tr -d '\\n')\" ]; then\r\n  rm -fr $TMPDIR\r\n  exit 1\r\nfi\r\n\r\nrm -fr $TMPDIR\r\n\r\ncertbot.orig \"$@\"\r\n```"}}
{"actor":{"display_login":"camlafit"}}