Skip to content

Commit ea3864d

Browse files
authored
Merge pull request #414 from rvstaveren/fix-hook-sh-fbsd-compact
Make compatible with `/bin/sh`, not all systems (FreeBSD) have `/bin/bash`
2 parents 8d82c5a + 78cd0b2 commit ea3864d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

templates/hook.sh.epp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Variant[String[1], Array[String[1], 1]] $commands,
33
Boolean $validate_env = false,
44
| -%>
5-
#!/bin/bash
5+
#!/bin/sh
66
# THIS FILE IS MANAGED BY PUPPET
77
#
88
# This script is intended to be used by certbot's hooks. The same simple Puppet
@@ -30,17 +30,17 @@ echo_err() {
3030

3131
### Begin script
3232

33-
if [[ "$validate_env" -gt 0 ]]; then
33+
if [ "$validate_env" -gt 0 ]; then
3434
bork=0
35-
if [[ -z "$RENEWED_DOMAINS" ]]; then
35+
if [ -z "$RENEWED_DOMAINS" ]; then
3636
bork=1
3737
echo_err "Environment variable RENEWED_DOMAINS is empty"
3838
fi
39-
if [[ -z "$RENEWED_LINEAGE" ]]; then
39+
if [ -z "$RENEWED_LINEAGE" ]; then
4040
bork=1
4141
echo_err "Environment variable RENEWED_LINEAGE is empty"
4242
fi
43-
[[ "$bork" -gt 0 ]] && exit 1
43+
[ "$bork" -gt 0 ] && exit 1
4444
fi
4545

4646
<% flatten([$commands]).each | $command | { -%>

0 commit comments

Comments
 (0)