Yannik / qnap-letsencrypt

Let's Encrypt on QNAP
318 stars 59 forks source link

One command fails on old QNAP NAS #82

Closed afiller closed 4 years ago

afiller commented 4 years ago

Platform/Firmware Information

Platform = MARVELL_6281

Model = TS-210
Internal Model = TS-219
Version = 4.2.6
Build Number = 20200421
Rsync Model = QNAP
Build Date = 2020-04-21

Is this the latest firmware for your device?

yes

Issue Summary (provide relevant error messages and log output):

Your script performs...

lsof -i tcp:80 -a -c python -t | xargs --no-run-if-empty -I {} sh -c 'echo "Killing old python process {} hogging port 80" && kill {} && sleep 1'

...and I get the following error:

xargs: unrecognized option `--no-run-if-empty'
BusyBox v1.01 (2020.04.21-05:26+0000) multi-call binary

Usage: xargs [COMMAND] [OPTIONS] [ARGS...]

Executes COMMAND on every item given by standard input.

Options:
    -r  Do not run command for empty readed lines
    -x  Exit if the size is exceeded
    -0  Input filenames are terminated by a null character
    -t  Print the command line on stderr before executing it.

When I comment out the line the rest works like a charm, but I am quite sure you added the line for a reason. :) Do you have any ideas how to fix this? "findutils", which in my opinion contains xargs is already the newest available version via opkg.

Thanks in advance!

Andreas

Yannik commented 4 years ago

@afiller Please try it now, I tried to make it compatible with your old busybox version.

afiller commented 4 years ago

Nice and thank you. It really seems to work! I manually run the command and no error is thrown. I will report, if the renewal fails, but I am quite sure that it works. 👍 It's really so cool to have letsencrypt on such an old NAS.

Yannik commented 4 years ago

@afiller I'm glad that it works, and thanks for the coffee :)