acmesh-official / acmesh-official/acme.sh

multiple cronjob support for multiple `--config-home`

Abierto
#5,131 2 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Shell
Estrellas
47.6k
Forks
5.7k
Merge medio
6 d 5 h
PR fusionados (30 d)
15

Descripción

Steps to reproduce
------------------
right now `--install-cronjob` install a cronjob only if one not exists by check `crontab -l | grep 'acme.sh --cron'`.
i have multiple `--config-home` for different purpos.
i need the support for install cronjob for different `--config-home` like:
```bash
--install-cronjob --config-home /acme.sh/letsencrypt
--install-cronjob --config-home /acme.sh/letsencrypt_test
```
Debug log
-----------------

```
/ # crontab -l
35 11 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" --config-home "/acme.sh" > /proc/1/fd/1 2>/proc/1/fd/2
/ #
/ #
/ # --install-cronjob --config-home /acme.sh/letsencrypt --debug 2
[Fri May 3 13:43:41 UTC 2024] Lets find script dir.
[Fri May 3 13:43:41 UTC 2024] _SCRIPT_='/root/.acme.sh/acme.sh'
[Fri May 3 13:43:41 UTC 2024] _script='/root/.acme.sh/acme.sh'
[Fri May 3 13:43:41 UTC 2024] _script_home='/root/.acme.sh'
[Fri May 3 13:43:41 UTC 2024] Using default home:/root/.acme.sh
[Fri May 3 13:43:41 UTC 2024] Using config home:/acme.sh/letsencrypt
[Fri May 3 13:43:41 UTC 2024] LE_WORKING_DIR='/root/.acme.sh'
https://github.com/acmesh-official/acme.sh
v3.0.8
[Fri May 3 13:43:41 UTC 2024] Running cmd: installcronjob
[Fri May 3 13:43:41 UTC 2024] Using config home:/acme.sh/letsencrypt
[Fri May 3 13:43:41 UTC 2024] default_acme_server
[Fri May 3 13:43:41 UTC 2024] ACME_DIRECTORY='https://acme.zerossl.com/v2/DV90'
[Fri May 3 13:43:41 UTC 2024] _ACME_SERVER_HOST='acme.zerossl.com'
[Fri May 3 13:43:41 UTC 2024] _ACME_SERVER_PATH='v2/DV90'
[Fri May 3 13:43:41 UTC 2024] Installing cron job
35 11 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" --config-home "/acme.sh" > /proc/1/fd/1 2>/proc/1/fd/2
/ #
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start at the --install-cronjob handling and the crontab -l check for 'acme.sh --cron' described in the issue. Reproduce the two commands with different --config-home values, then verify that each distinct configuration receives its own cron entry without duplicating an existing one.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
shell
Área
cli, devops
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
54/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.