Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility Issues with acme.sh on QNAP NAS: xargs printf and account.conf #6196

Open
imkgh opened this issue Jan 12, 2025 · 1 comment
Open

Comments

@imkgh
Copy link

imkgh commented Jan 12, 2025

Steps to reproduce

Debug log

acme.sh --issue ..... --debug 2

1. Compatibility Issue: xargs printf Fails on QNAP NAS

I encountered a compatibility issue while using acme.sh on a QNAP NAS. The script contains two lines that combine xargs and printf, but these commands fail on QNAP’s environment due to differences in how xargs and printf are implemented. Specifically, QNAP uses a simplified version of these tools (BusyBox), which causes the following error:

xargs: printf: No such file or directory

The issue comes from these two lines in acme.sh:

./acme.sh:578:if _exists xargs && [ "$(printf %s '\\x41' | xargs printf)" = 'A' ]; then
./acme.sh:602:      echo "$hex" | _upper_case | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/g' | xargs printf

Suggested fix like:

./acme.sh:578: if _exists printf && [ "$(printf '\x41')" = 'A' ]; then

./acme.sh:602:       printf "$(echo "$hex" | _upper_case | sed 's/\([0-9A-F]\{2\}\)/\\x\1/g')"

This modification eliminates the dependency on xargs printf and improves compatibility with minimal environments without changing the functionality.

2. Compatibility Issue: account.conf in Non-Bash Environments

Another issue I encountered while using acme.sh on my QNAP NAS relates to the behavior of account.conf in non-bash environments.

alias acme.sh='/path/to/acme/acme.sh --home /path/to/acme --config-home /path/to/acme/ --cert-home /path/to/acme/cert'

Thanks for you time.

Copy link

Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade If it's still not working, please provide the log with --debug 2, otherwise, nobody can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant