From c42446f437cf1b67ecb95e4e6ba36bad1c88a9e1 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Fri, 14 Feb 2014 14:52:57 +0100 Subject: [PATCH] added rc.local --- tpl/etc/rc.local | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 tpl/etc/rc.local diff --git a/tpl/etc/rc.local b/tpl/etc/rc.local new file mode 100755 index 0000000..6a274f8 --- /dev/null +++ b/tpl/etc/rc.local @@ -0,0 +1,21 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# Print the IP address +_IP=$(hostname -I) || true +if [ "$_IP" ]; then + printf "My IP address is %s\n" "$_IP" + /home/pi/bin/notify_boot.sh "$_IP" +fi + +exit 0