Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion incus/tools.func
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ motd_ssh() {
local ip
ip=$(get_lxc_ip)
cat <<EOF >/etc/motd
🚀 Incus Container: $(hostname)
🚀 Incus Container: $(uname -n)
🖥️ OS: $(grep ^PRETTY_NAME /etc/os-release 2>/dev/null | cut -d= -f2 | tr -d '"')
📡 IP Address: ${ip}
EOF
Expand Down
7 changes: 5 additions & 2 deletions lib/system.func
Original file line number Diff line number Diff line change
Expand Up @@ -2098,8 +2098,11 @@ verify_gpg_fingerprint() {
create_self_signed_cert() {
local APP_NAME="${1:-${APPLICATION}}"
local EXTRA_SAN="${2:-}"
local HOSTNAME="$(hostname -f)"
local IP="$(hostname -I | awk '{print $1}')"
# RHEL-family minimal images ship no hostname binary, which left CN and SAN empty.
local HOSTNAME IP
HOSTNAME="$(hostname -f 2>/dev/null || uname -n)"
IP="$(hostname -I 2>/dev/null | awk '{print $1}')"
[[ -n "$IP" ]] || IP="$(ip -4 route get 1 2>/dev/null | sed -n 's/.* src \([0-9.]\+\).*/\1/p' | head -1)"
local APP_NAME_LC=$(echo "${APP_NAME,,}" | tr -d ' ')
local CERT_DIR="/etc/ssl/${APP_NAME_LC}"
local CERT_KEY="${CERT_DIR}/${APP_NAME_LC}.key"
Expand Down
2 changes: 1 addition & 1 deletion lxc/install.func
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ EOF
echo -e "${GATEWAY:-}${YW:-}Provided by: ${GN:-}community-scripts ORG ${YW:-}| GitHub: ${GN:-}https://github.com/community-scripts/ProxmoxVE${CL:-}"
echo ""
echo -e "${OS:-}${YW:-}OS: ${GN:-}${os_name} - Version: ${os_version}${CL:-}"
echo -e "${HOSTNAME:-}${YW:-}Hostname: ${GN:-}\$(hostname)${CL:-}"
echo -e "${HOSTNAME:-}${YW:-}Hostname: ${GN:-}\$(uname -n)${CL:-}"
echo -e "${INFO:-}${YW:-}IP Address: ${GN:-}\$(ip -4 route get 1 2>/dev/null | sed -n 's/.* src \\([0-9.]\\+\\).*/\\1/p' | head -1)${CL:-}"
EOF

Expand Down
Loading
Loading