{"action":"created","issue":{"url":"https://api.github.com/repos/diafygi/acme-tiny/issues/99","repository_url":"https://api.github.com/repos/diafygi/acme-tiny","labels_url":"https://api.github.com/repos/diafygi/acme-tiny/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/diafygi/acme-tiny/issues/99/comments","events_url":"https://api.github.com/repos/diafygi/acme-tiny/issues/99/events","html_url":"https://github.com/diafygi/acme-tiny/issues/99","id":139376025,"number":99,"title":"I created a small wrapper script to automate acme-tiny a bit","user":{"login":"tasn","id":108670,"avatar_url":"https://avatars.githubusercontent.com/u/108670?v=3","gravatar_id":"","url":"https://api.github.com/users/tasn","html_url":"https://github.com/tasn","followers_url":"https://api.github.com/users/tasn/followers","following_url":"https://api.github.com/users/tasn/following{/other_user}","gists_url":"https://api.github.com/users/tasn/gists{/gist_id}","starred_url":"https://api.github.com/users/tasn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasn/subscriptions","organizations_url":"https://api.github.com/users/tasn/orgs","repos_url":"https://api.github.com/users/tasn/repos","events_url":"https://api.github.com/users/tasn/events{/privacy}","received_events_url":"https://api.github.com/users/tasn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-08T19:49:13Z","updated_at":"2016-03-15T13:15:56Z","closed_at":null,"body":"Hey,\r\n\r\nI hope this is the best place to discuss it. I'm writing it here because I couldn't find an IRC channel/ML to discuss it on.\r\nI know this script is intended to be as small as possible and thus is kept as simple as possible. That is great and what drew me to it in the first place. I have since created a (small) wrapper script (can be found in: https://github.com/tasn/acme-tiny-wrapper) that downloads the letsencrypt certificate, walks a directory full of CSRs and creates certificates for each. I wrote a blog post (https://stosb.com/blog/secure-your-letsencrypt-setup-with-acme-tiny/) about using acme-tiny and this script and I have been using it on my server for a while now.\r\n\r\nDo you think it's relevant to include a link to it (or any other similar solution) at the bottom of the README?"},"comment":{"url":"https://api.github.com/repos/diafygi/acme-tiny/issues/comments/196812314","html_url":"https://github.com/diafygi/acme-tiny/issues/99#issuecomment-196812314","issue_url":"https://api.github.com/repos/diafygi/acme-tiny/issues/99","id":196812314,"user":{"login":"CasperVector","id":1498481,"avatar_url":"https://avatars.githubusercontent.com/u/1498481?v=3","gravatar_id":"","url":"https://api.github.com/users/CasperVector","html_url":"https://github.com/CasperVector","followers_url":"https://api.github.com/users/CasperVector/followers","following_url":"https://api.github.com/users/CasperVector/following{/other_user}","gists_url":"https://api.github.com/users/CasperVector/gists{/gist_id}","starred_url":"https://api.github.com/users/CasperVector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CasperVector/subscriptions","organizations_url":"https://api.github.com/users/CasperVector/orgs","repos_url":"https://api.github.com/users/CasperVector/repos","events_url":"https://api.github.com/users/CasperVector/events{/privacy}","received_events_url":"https://api.github.com/users/CasperVector/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T13:15:56Z","updated_at":"2016-03-15T13:15:56Z","body":"My approach with the modified script in #102 (licensed under CC0 if you do mind):\r\n```\r\n#!/bin/bash\r\n\r\nmax=3\r\ndomain='example.com'\r\nemca='/home/robot/.emca.conf'\r\nssl='/etc/ssl/public'\r\ncrt=\"$ssl/server.crt\"\r\npat='\\/\\.well-known\\/acme-challenge\\/'\r\n\r\nsed -i \"/$pat/ s/^#//\" /etc/nginx/server.conf\r\ninvoke-rc.d nginx reload\r\n\r\ninstall -d -o robot -g www-data -m110 /srv/www/.well-known\r\ninstall -d -o robot -g www-data -m310 /srv/www/.well-known/acme-challenge\r\nsudo -u robot emca auth /home/robot/.emca.conf\r\nsudo -u robot emca sign /home/robot/.emca.conf > \"$crt\".0; ret=\"$?\"\r\nrm -rf /srv/www/.well-known\r\n\r\nif [[ \"$ret\" -ne 0 ]]\r\nthen rm \"$crt\".0\r\nelse\r\n        for i in $(seq \"$max\" | tac); do\r\n                if [[ -f \"$crt\".\"$i\" ]]; then\r\n                        if [[ \"$i\" -eq \"$max\" ]]\r\n                        then rm \"$crt\".\"$i\"\r\n                        else mv \"$crt\".\"$i\" \"$crt\".\"$((i + 1))\"\r\n                        fi\r\n                fi\r\n        done\r\n        mv \"$crt\" \"$crt\".1\r\n        mv \"$crt\".0 \"$crt\"\r\n        cat \"$crt\" \"$ssl\"/chain.crt > \"$ssl\"/\"$domain\".crt.0\r\n        mv \"$ssl\"/\"$domain\".crt.0 \"$ssl\"/\"$domain\".crt\r\nfi\r\n\r\nsed -i \"/$pat/ s/^/#/\" /etc/nginx/server.conf\r\ninvoke-rc.d nginx reload\r\n```"}}