Browse Source

Use custom certbot config path

Miraty 1 year ago
parent
commit
0496feb8fb
3 changed files with 7 additions and 1 deletions
  1. 3 1
      config.template.ini
  2. 2 0
      fn/ht.php
  3. 2 0
      pg-act/ht/add-dns.php

+ 3 - 1
config.template.ini

@@ -46,8 +46,10 @@ tor_user = "tor"
 tor_reload_cmd = "/usr/bin/systemctl reload tor"
 onion_internal_host = "[::1]:9080"
 
-sudo_path = "/usr/bin/sudo"
 certbot_path = "/usr/bin/certbot"
+certbot_config_path = "/etc/letsencrypt/servnest.cli"
+
+sudo_path = "/usr/bin/sudo"
 chgrp_path = "/usr/bin/chgrp"
 cat_path = "/usr/bin/cat"
 rm_path = "/usr/bin/rm"

+ 2 - 0
fn/ht.php

@@ -138,6 +138,8 @@ function htDeleteSite(string $address, string $type, string $user_id): void {
 		exescape([
 			CONF['ht']['sudo_path'],
 			CONF['ht']['certbot_path'],
+			'--config',
+			CONF['ht']['certbot_config_path'],
 			'delete',
 			'--quiet',
 			'--cert-name',

+ 2 - 0
pg-act/ht/add-dns.php

@@ -33,6 +33,8 @@ rateLimit();
 exescape([
 	CONF['ht']['sudo_path'],
 	CONF['ht']['certbot_path'],
+	'--config',
+	CONF['ht']['certbot_config_path'],
 	'certonly',
 	'--domain',
 	$_POST['domain'],