remove j2 file extensions

This commit is contained in:
2025-10-12 19:13:00 -07:00
parent 859bb6cb79
commit b491da77f0
15 changed files with 91 additions and 29 deletions

View File

@ -1,10 +1,12 @@
[Unit]
Description=Update /etc/issue with ethN IP addresses
Description=Update login screen with IP addresses
After=network-online.target
[Service]
ExecStart=/root/update_issue.sh
Type=oneshot
Type=simple
User=root
Group=root
[Install]
WantedBy=multi-user.target

View File

@ -1,17 +1,31 @@
#!/bin/bash
# Retrieve IP addresses of interfaces
ip_addresses=$(ip -o -4 addr show | awk '(/eth|en|wl|wn|vmpbr0|tun/) {print $2 "," $4 "\r"}' | column -s , -t)
# Get OS Build Info
os_build=$(cat /etc/os-release | grep PRETTY | cut -d "\"" -f 2)
# Put hostname in a variable that probably isn't reserved or anything
host_name=$(hostname)
# Write to /etc/issue
{
echo $os_build
echo "Hostname: ${host_name}"
echo "IP Addresses:"
echo "$ip_addresses"
} > /etc/issue
i=1
while [ $i ]
do
# Retrieve IP addresses of interfaces
ip_addresses=$(ip -o -4 addr show | awk '(/eth|en|wl|wn|vmpbr0|tun/) {print $2 "," $4 "\r"}' | column -s , -t)
# Get OS Build Info
os_build=$(cat /etc/os-release | grep PRETTY | cut -d "\"" -f 2)
# Put hostname in a variable that probably isn't reserved or anything
host_name=$(hostname)
# Write to /etc/issue
{
echo $os_build
echo "Hostname: ${host_name}"
echo "IP Addresses:"
echo "$ip_addresses"
} > /etc/issue
sleep 1
done