> On 25 Mar 2019, at 01:40, Stuart Henderson <[email protected]> wrote:
>
> On 2019-03-23, Mischa <[email protected]> wrote:
>> Hi Geir,
>>
>> I have solved this with a little script.
>>
>> ###
>> #!/bin/sh
>> OUT=2
>> /usr/sbin/acme-client -v www.example.com
>> if test $? -eq 0
>> then EXT=$?
>> fi
>> /usr/sbin/acme-client -v www.example1.com
>> if test $? -eq 0
>> then EXT=$?
>> fi
>> if test $EXT -eq 0
>> then
>> echo "New certificates installed."
>> rcctl restart httpd
>> else echo "No new certificates installed."
>> fi
>> ###
>
> Simpler:
>
> for i in www.example.com www.example1.com; do
> acme-client -v $i && reload=y
> done
> [[ -n $reload ]] && rcctl reload httpd
Nice!! I have a couple of more domains in there, so the 'for' becomes a little
ugly, but I keep forgetting &&.
It's indeed not needed to use the actual exit code.
Mischa