Browse Source

Create BASEDIR if missing

Olivier Mauras 2 years ago
parent
commit
762fd2ef6d
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      certbot_manual

+ 4
- 0
certbot_manual View File

@@ -1,6 +1,10 @@
1 1
 #!/usr/bin/env bash
2 2
 . /etc/certbot/config
3 3
 
4
+# Create BASEDIR if missing
5
+[[ ! -d ${BASEDIR} ]] && mkdir -p ${BASEDIR}/{etc,var/log}
6
+
7
+# Run the certbot command with the correct options
4 8
 certbot --config-dir ${BASEDIR}/etc \
5 9
 	--work-dir ${BASEDIR} \
6 10
 	--logs-dir ${BASEDIR}/var/log \