summaryrefslogtreecommitdiffstats
path: root/modules/certbot/files/bootstrap-certbot
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-10-19 23:15:14 -0400
committerJesse Luehrs <doy@tozt.net>2018-10-19 23:15:14 -0400
commit8317b706d7a0a91c67c46950be07d40168705b6c (patch)
tree0dbba9df21c01deb1ed165fda1dce43dbdd8e2d5 /modules/certbot/files/bootstrap-certbot
parentd0ef063b3d2cf7b4c2eba540a0773dae3afc26ef (diff)
downloadpuppet-tozt-8317b706d7a0a91c67c46950be07d40168705b6c.tar.gz
puppet-tozt-8317b706d7a0a91c67c46950be07d40168705b6c.zip
rename modules dir
Diffstat (limited to 'modules/certbot/files/bootstrap-certbot')
-rwxr-xr-xmodules/certbot/files/bootstrap-certbot69
1 files changed, 0 insertions, 69 deletions
diff --git a/modules/certbot/files/bootstrap-certbot b/modules/certbot/files/bootstrap-certbot
deleted file mode 100755
index 4cf3ea5..0000000
--- a/modules/certbot/files/bootstrap-certbot
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env bash
-set -eu
-set -o pipefail
-
-config_dir="$1"
-if systemctl is-active -q nginx; then
- is_running=1
-else
- is_running=
-fi
-
-cleanup() {
- if [ -z "$is_running" ]; then
- systemctl stop nginx
- fi
-
- if [ -e /etc/nginx/nginx.conf.backup ]; then
- mv /etc/nginx/nginx.conf.backup /etc/nginx.conf
- fi
-}
-trap cleanup EXIT
-
-mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup
-cat > /etc/nginx/nginx.conf <<EOF
-worker_processes 1;
-events {
- worker_connections 1024;
-}
-http {
- server {
- listen 80 default;
- server_name tozt.net;
- location / {
- root /tmp;
- }
- }
- server {
- listen 80;
- server_name blog.tozt.net;
- location / {
- root /tmp;
- }
- }
- server {
- listen 80;
- server_name paste.tozt.net;
- location / {
- root /tmp;
- }
- }
- server {
- listen 80;
- server_name git.tozt.net;
- location / {
- root /tmp;
- }
- }
-}
-EOF
-
-if [ -z "$is_running" ]; then
- systemctl start nginx
-fi
-
-if [ -z "$config_dir" ]; then
- /usr/bin/certbot -n --agree-tos -m doy@tozt.net --nginx -d tozt.net -d blog.tozt.net -d paste.tozt.net -d git.tozt.net
-else
- /usr/bin/certbot -n --agree-tos -m doy@tozt.net --nginx -d tozt.net -d blog.tozt.net -d paste.tozt.net -d git.tozt.net --config-dir "$config_dir"
-fi