20 lines
297 B
Bash
20 lines
297 B
Bash
|
#!/usr/bin/env sh
|
||
|
|
||
|
set -a
|
||
|
. ./service.env
|
||
|
set +a
|
||
|
|
||
|
domain="$1"
|
||
|
action="${2:-renew}"
|
||
|
|
||
|
docker compose run --rm app \
|
||
|
--domains "$domain" \
|
||
|
"$action" \
|
||
|
"--$action-hook" "/config/hook.sh"
|
||
|
|
||
|
if [ "$?" = "33" ] && [ -x "./lego.d/$domain" ];
|
||
|
then
|
||
|
echo "Running hook for $domain"
|
||
|
"./lego.d/$domain"
|
||
|
fi
|