Skip to content

Instantly share code, notes, and snippets.

View DasLeo's full-sized avatar

Philipp Leonhardt DasLeo

  • Haiilo GmbH
  • Norderstedt, Germany
View GitHub Profile
@DasLeo
DasLeo / bash-path-vars
Created February 23, 2020 06:32 — forked from caruccio/bash-path-vars
Path manipulation with bash vars
$ FILE=/some/path/to/file.txt
###################################
### Remove matching suffix pattern
###################################
$ echo ${FILE%.*} # remove ext
/some/path/to/file
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts
#!/bin/sh
DOMAIN="$1"
# STAGING Test
#OUTPUT=$(docker run --rm --name certbot --network haproxy-net -e 9001:9001 -v letsencrypt:/etc/letsencrypt -v letsencrypt-logs:/var/log/letsencrypt certbot/certbot certonly --standalone --non-interactive --agree-tos --http-01-port=9001 --deploy-hook 'cat $RENEWED_LINEAGE/fullchain.pem $RENEWED_LINEAGE/privkey.pem > /etc/letsencrypt/haproxy/$(basename $RENEWED_LINEAGE)-combined.pem; chown root: "/etc/letsencrypt/haproxy/$(basename $RENEWED_LINEAGE)-combined.pem"; chmod 400 "/etc/letsencrypt/haproxy/$(basename $RENEWED_LINEAGE)-combined.pem"' --staging -d "$DOMAIN")
OUTPUT=$(docker run --rm --name certbot --network haproxy-net -e 9001:9001 -v letsencrypt:/etc/letsencrypt -v letsencrypt-logs:/var/log/letsencrypt certbot/certbot certonly --standalone --non-interactive --agree-tos --http-01-port=9001 --deploy-hook 'cat $RENEWED_LINEAGE/fullchain.pem $RENEWED_LINEAGE/privkey.pem > /etc/letsencrypt/haproxy/$(basename $RENEWED_LINEAGE)-combined.pem; chown root: "/etc/letsencry