Skip to content

Instantly share code, notes, and snippets.

@polera
Created June 30, 2014 22:07
Show Gist options
  • Save polera/0989ddc652e409024fd4 to your computer and use it in GitHub Desktop.
Save polera/0989ddc652e409024fd4 to your computer and use it in GitHub Desktop.
#!/bin/sh
. /etc/rc.subr
name="updateissue"
start_cmd="${name}_start"
stop_cmd=":"
updateissue_start()
{
echo "Updating /etc/issue"
ifconfig em0 | awk '/inet/ {print "\n\nSSH to this IP - " $2}' | cut -f2 -d: > /etc/issue
echo "Updated..."
}
load_rc_config $name
run_rc_command "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment