#!/bin/sh
# Startdate: 2023-12-14-5 10:17
# Reference:
#    https://stackoverflow.com/questions/29609371/how-not-to-pass-the-locale-through-an-ssh-connection-command
# Documentation:
#    Not needed for Devuan because this AcceptEnv is already in the default file sshd_config
tf="/etc/ssh/sshd_config.d/30-locale.conf"
test ! -f "${tf}" && touch "${tf}"
grep -qE '^AcceptEnv.*LC_\*' "${tf}" 1>/dev/null 2>&1 || {
   printf "%s\n" 'AcceptEnv LANG LC_*' >> "${tf}"
   systemctl reload sshd
}
