Merge pull request #243 from t413/master

Support for shells without 'stat' (busybox ash)
pull/245/head
neil 8 years ago committed by GitHub
commit 7a60c14b31

@ -32,6 +32,7 @@ Wiki: https://github.com/Neilpang/acme.sh/wiki
|14|-----| Cloud Linux https://github.com/Neilpang/le/issues/111
|15|[![](https://cdn.rawgit.com/Neilpang/acmetest/master/status/openbsd.svg)](https://github.com/Neilpang/letest#here-are-the-latest-status)|OpenBSD
|16|[![](https://cdn.rawgit.com/Neilpang/acmetest/master/status/mageia.svg)](https://github.com/Neilpang/letest#here-are-the-latest-status)|Mageia
|17|-----| OpenWRT: Tested and working. See [wiki page](https://github.com/Neilpang/acme.sh/wiki/How-to-run-on-OpenWRT)
For all build statuses, check our [daily build project](https://github.com/Neilpang/acmetest):

@ -549,6 +549,8 @@ _stat() {
if stat -f '%Su:%Sg' "$1" 2>/dev/null ; then
return
fi
return 1; #error, 'stat' not found
}
#keyfile
@ -1656,9 +1658,12 @@ issue() {
mkdir -p "$wellknown_path"
printf "%s" "$keyauthorization" > "$wellknown_path/$token"
if [ ! "$usingApache" ] ; then
webroot_owner=$(_stat $_currentRoot)
_debug "Changing owner/group of .well-known to $webroot_owner"
chown -R $webroot_owner "$_currentRoot/.well-known"
if webroot_owner=$(_stat $_currentRoot) ; then
_debug "Changing owner/group of .well-known to $webroot_owner"
chown -R $webroot_owner "$_currentRoot/.well-known"
else
_debug "not chaning owner/group of webroot";
fi
fi
fi

Loading…
Cancel
Save