Propagate IP adress

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
dietpiOK
Posts: 76
Joined: Thu Mar 16, 2017 9:33 am

Propagate IP adress

Post by dietpiOK »

Hi,

I want my raspi to propagate it's IP address to me automatically after boot up.
Easiest way for me would be to run a python script that will send me an email.
But how / where can I apply running that script at the end of the boot-sequence? I will not log-in to the raspi since it will just run as a LAMP-server...

Thanks in advance,
Olaf
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: Propagate IP adress

Post by WarHawk »

/etc/rc.local

put a link to the .py file, that file is the last to run, so then it will run that python script once it's booted
dietpiOK
Posts: 76
Joined: Thu Mar 16, 2017 9:33 am

Re: Propagate IP adress

Post by dietpiOK »

Tanks, that works.
A little strange to just link the .py script and not apply an entire command like "python3 myscript.py"...
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: Propagate IP adress

Post by WarHawk »

That's what I meant...the command pointing to the script...sorry for the confusion
Post Reply