Use absolute path to config.ini to script can be started with rc.local.
This commit is contained in:
		@@ -57,7 +57,10 @@ import ConfigParser
 | 
				
			|||||||
from plotly.graph_objs import *
 | 
					from plotly.graph_objs import *
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config = ConfigParser.ConfigParser()
 | 
					config = ConfigParser.ConfigParser()
 | 
				
			||||||
config.read("config.ini")
 | 
					config.read("/home/pi/Documents/pi-temp/config.ini") #It is important to provide an
 | 
				
			||||||
 | 
												     #absolute path to the config
 | 
				
			||||||
 | 
												     #file, otherwise rc.local won't be
 | 
				
			||||||
 | 
												     #able to find it!
 | 
				
			||||||
port = config.getint('SERVER', 'PORT') 
 | 
					port = config.getint('SERVER', 'PORT') 
 | 
				
			||||||
sensor = config.get('SENSOR','TYPE') 
 | 
					sensor = config.get('SENSOR','TYPE') 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user