mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-10 00:11:45 +00:00
Support for shells without 'stat' (busybox ash)
- the _stat command can now return an error - the issue() command chown command isn't run if _stat fails
This commit is contained in:
parent
c9c31c04c3
commit
32fdc19697
10
acme.sh
10
acme.sh
@ -549,6 +549,7 @@ _stat() {
|
|||||||
if stat -f '%Su:%Sg' "$1" 2>/dev/null ; then
|
if stat -f '%Su:%Sg' "$1" 2>/dev/null ; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
return 3; #error, 'stat' not found
|
||||||
}
|
}
|
||||||
|
|
||||||
#keyfile
|
#keyfile
|
||||||
@ -1656,9 +1657,12 @@ issue() {
|
|||||||
mkdir -p "$wellknown_path"
|
mkdir -p "$wellknown_path"
|
||||||
printf "%s" "$keyauthorization" > "$wellknown_path/$token"
|
printf "%s" "$keyauthorization" > "$wellknown_path/$token"
|
||||||
if [ ! "$usingApache" ] ; then
|
if [ ! "$usingApache" ] ; then
|
||||||
webroot_owner=$(_stat $_currentRoot)
|
if webroot_owner=$(_stat $_currentRoot) ; then
|
||||||
_debug "Changing owner/group of .well-known to $webroot_owner"
|
_debug "Changing owner/group of .well-known to $webroot_owner"
|
||||||
chown -R $webroot_owner "$_currentRoot/.well-known"
|
chown -R $webroot_owner "$_currentRoot/.well-known"
|
||||||
|
else
|
||||||
|
_debug "not chaning owner/group of webroot";
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user