diff py/config.py @ 461:1eb68df9f8ab

Add daemon mode with locking, add "disabled" parameter
author Matt Johnston <matt@ucc.asn.au>
date Fri, 11 Jan 2013 23:41:56 +0800
parents c34083c078db
children ccebadce4619
line wrap: on
line diff
--- a/py/config.py	Thu Jan 10 19:46:32 2013 +0800
+++ b/py/config.py	Fri Jan 11 23:41:56 2013 +0800
@@ -1,3 +1,4 @@
+import os.path
 
 FRIDGE_SLEEP = 60
 SENSOR_SLEEP = 15
@@ -9,7 +10,7 @@
 # 12 hours
 MAX_READINGS = 12*60*60 / SENSOR_SLEEP
 
-PARAMS_FILE = './tempserver.conf'
+PARAMS_FILE = os.path.join(os.path.dirname(__file__), 'tempserver.conf')
 
 SENSOR_BASE_DIR = '/sys/devices/w1_bus_master1'
 FRIDGE_GPIO = '/sys/devices/virtual/gpio/gpio17'