iredmail / mlmmjadmin

A simple RESTful API server used to manage mlmmj (http://mlmmj.org) mailing list manager.
https://www.iredmail.org/
53 stars 22 forks source link

upgrade_mlmmjadmin.sh fails on FreeBSD 13 #20

Closed elchy closed 2 years ago

elchy commented 2 years ago

KERNEL_NAME="$(uname -s | tr '[a-z]' '[A-Z]')" obviously doesn't work on FreeBSD (13.0-RELEASE-p4, current port tree). I replaced that with export KERNEL_NAME="$(uname -s | tr '[:lower:]' '[:upper:]')" to fix this.

On FreeBSD, the script checks for CMD_PIP3='/usr/local/bin/pip3' but the port devel/py-pip doesn't install that file but only /usr/local/bin/pip which is a symlink to /usr/local/bin/pip-3.8.

iredmail commented 2 years ago

Dear @elchy,

elchy commented 2 years ago

Probably my fault to not use the default LANG variable... % echo $LANG en_US.ISO8859-1 % uname -s FreeBSD % uname -s | tr '[a-z]' '[A-Z]' Gs??Ct? % uname -s | tr '[:lower:]' '[:upper:]' FREEBSD ... setting $LANG to the default makes the translation work correctly. % export LANG=C.UTF8 % uname -s | tr '[a-z]' '[A-Z]' FREEBSD

iredmail commented 2 years ago

Fixed this bug moment ago. Thank you very much for the feedback. :)

iredmail commented 2 years ago

Oops, i just realize that we have this fix in iRedAdmin upgrade script, but you reported same issue with iRedAdmin. Could you please try the fix and let me know how it works on your system? https://github.com/iredmail/mlmmjadmin/commit/6d138af7fcfe8fe437a5bbd27710b830684bf4da

elchy commented 2 years ago

You're right, upgrade_iredadmin.sh workes out-of-the-box. export LC_ALL='C' does the trick.

Thanks for fixing it in the other upgrade scripts.

iredmail commented 2 years ago

Thanks for the feedback. :)