/linux-stuff

Linux Miscellaneous Stuff

Primary LanguageShellGNU General Public License v2.0GPL-2.0

Linux Stuff

acme.sh and acme-dns Scripts

Convert LE Account Data from Certbot to acme.sh/acme-dns

The script convert-certbot-le-account-to-acme.sh reads the Let’s Encrypt account data from certbot and converts it for acme.sh and/or acme-dns. The script itself is based on Python 3 and creates a Python virtual environment in its directory to avoid messing up the system’s environment with the required Python packages.

Usage: convert-certbot-le-account-to-acme.sh [-h] -i CERTBOT_ACCOUNT_DIR [-o1 ACME_SH_CA_DIR] [-o2 ACME_DNS_ACME_DIR]
The script also works if either the input dir is not an actual cerbot account directory (/etc/letsencrypt/<server>/directory/<certbot id = md5 of public key>/) and/or the ouptut directory is not an acme.sh ca directory and/or the ouptut directory is not an acme-dns acme directory. Then it will just use the directories as-is and will not do extra checks on the input or create the output directory structure for acme.sh/acme-dns.

Locales for International Work (ISO dates, 24h clock, etc.)

Most people that work internationally prefer to use English, but also ISO dates, 24h clocks and more. Unfortunately there is no locale that provides all of these at once.
Under locales are some locales with modifier @INTL that provide these. They are based on the glibc definitions.
glibc/XPG naming conversion for locales: language[_territory][.codeset][@modifier]

  • de_DE.UTF-8@INTL

  • en_DE.UTF-8

  • en_DE.UTF-8@INTL

  • en_GB.UTF-8@INTL

  • en_US.UTF-8@INTL

INTL definitions:

  • LC_TIME

    • ISO date format YYYY-MM-DD

    • 24h clock, but still supporting %r for AM/PM display

    • Display time zone

    • Week starts on Monday (like GB, sunday is part of the weekend)

      • glibc: The glibc Wiki for LC_TIME says that week’s WEEKSTARTDATE can be based on Monday, but that does not work for abday/day yet (<=2.36). Follow the compatibility path mentioned on the Wiki, although ISO 8601 specifies Monday to be 1 and not 2 and glibc’s i18n tries to achive this.

  • LC_NUMERIC, but also for LC_CURRENCY

    • decimal separator , (comma), thousands separator . (dot)

  • LC_MEASUREMENT

    • metric systems

  • LC_PAPER

    • A4

Table 1. A What to modify for @INTL and en_XX for non-english territories
Type i18n en_US en_GB de_DE @INTL en_DE en_DE@INTL

LC_CTYPE

i18n_ctype+translit_neutral

i18n+translit_combining

← en_US

i18n+translit_combining+extra

copy origin

copy de_DE

copy de_DE

LC_COLLATE

extra+iso14651_t1

iso14651_t1

iso14651_t1

iso14651_t1

copy origin

copy de_DE

copy de_DE

LC_MONETARY

XDR

USD

GBP

EUR

adapt/copy

copy de_DE

copy de_DE

LC_NUMERIC

comma, none, -1

dot, comma, 3

dot, comma, 3

comma, dot, 3

adapt/copy

copy de_DE

copy de_DE

LC_TIME

No texts, ISO Date (imperfect)

mm/dd/yyyy, 12h

dd/mm/yyyy, 12h

dd.mm.yyyy, 24h

adapt

adapt

copy en_US@INTL

LC_MESSAGES

"[+1]"/"[-0]"

yes/no

← en_US

ja/nein

copy origin

copy en_US

copy en_US

LC_PAPER

A4

Letter

i18n

i18n

copy i18n

copy de_DE

copy i18n

LC_NAME

No texts

Texts, %d%t%g%t%m%t%f

← en_US

Texts, %d%t%g%t%m%t%f

copy origin

copy en_US

copy en_US

LC_ADDRESS

only postal_format

US+language

GB+language

DE+language

copy origin

copy de_DE

copy de_DE

LC_TELEPHONE

generic format

country code

country code

country code

copy origin

copy de_DE

copy de_DE

LC_MEASUREMENT

1

2

i18n

i18n

copy i18n

copy de_DE

copy i18n

Additional Locales on Debian/Ubuntu

Additional Locales on Alpine

  • Standard library: musl

  • musl has only limited suppport for locales, and specifying locales is tedious.

  • Status: not relevant for my docker images