Go to advanced search

by jvendryes
Sun Jan 05, 2014 7:50 pm
Forum: General programming discussion
Topic: rc.local won't execute python mailer script (solved)
Replies: 11
Views: 12374

Re: rc.local won't execute python mailer script (solved)

Solved it. I set time.sleep(30) in my python script before everything executes and set Required-Start and Required-Stop back to $network.

The time.sleep(30) allows the Wifi portion to obtain its IP the first time before running the full script.

Good game!
by jvendryes
Sun Jan 05, 2014 5:37 pm
Forum: General programming discussion
Topic: rc.local won't execute python mailer script (solved)
Replies: 11
Views: 12374

Re: rc.local won't execute python mailer script (solved)

So, just to clarify, I can just update the name and symlink with no issues you think? Update I set: # Required-Start: $all $syslog # Required-Stop: $all $syslog The manual https://wiki.debian.org/LSBInitScripts states: $all facility supported by insserv to start a script after all the other scripts,...
by jvendryes
Sun Jan 05, 2014 3:41 pm
Forum: General programming discussion
Topic: rc.local won't execute python mailer script (solved)
Replies: 11
Views: 12374

Re: rc.local won't execute python mailer script (solved)

dalgibbard, I've followed your solution. It works great when I reboot the Pi, but when I boot from a shutdown, the script fails to load. I am using a wifi adapter, not sure if that matters. Here is my .py script: #!/usr/bin/python import subprocess import smtplib import socket from email.mime.text i...

Go to advanced search