Skip to content

@rubiojr /ip-info.sh
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
ip-info daemon
#!/bin/bash
#
# Stupid bash daemon to output IP addresses to /etc/ip-info file
#
INFO_FILE=/tmp/ip-info
FREQ=15
echo "Starting IP-INFO Daemon";
ip addr list | grep "inet " | cut -d' ' -f6 | cut -d/ -f1 > $INFO_FILE
while :; do
sleep $FREQ;
ip addr list | grep "inet " | cut -d' ' -f6 | cut -d/ -f1 > $INFO_FILE
done & disown -h $!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.