Skip to content

Instantly share code, notes, and snippets.

@emilcarr
Created March 14, 2021 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emilcarr/ab88fc432ca85a2a6339f36ea29e9361 to your computer and use it in GitHub Desktop.
Save emilcarr/ab88fc432ca85a2a6339f36ea29e9361 to your computer and use it in GitHub Desktop.
Display IP address on boot
# put me in /etc/systemd/system/display-ip.service
[Unit]
Description=Display IP address on boot
After=multi-user.target
After=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c "echo `ifconfig | awk '/inet /{print $2}'` > /dev/tty1"
[Install]
WantedBy=default.target
Wants=network-online.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment