Running Script On Startup - Raspberry Pi Forums


hey guys

installed ssmtp utilities on raspberry pi , set can send myself emails. following works fine if manually: ifconfig | mail -s "filename" usermail@gmail.com. if type email info ifconfig. want though email after raspberry pi has connected wifi. because want use putty in college run raspberry headless need see local address in order that.

created script called ipdata.py , in declared ifconfig | mail -s "filename" usermail@gmail.com. variable called variable in script. after in /etc/rc.local added python folowed full pathway ipdata.py file. script not run on startup @ though. tips?

thanks!

marco

using shell script start python program runs shell command seems little complicated.
consider using full path program-files. test command "root" user see if root user creates problem.

there script called "ip-up.local" somewhere run automatically when network interface has become "up". more suitable place run command.

believe there option in "raspi-config" wait network interface before running services ( https://www.raspberrypi.org/blog/latest ... an-update/ )


raspberrypi



Comments