Add start script to launch domod and sprinklerd

This commit is contained in:
jbnadal
2017-06-08 12:19:27 +02:00
parent 77364fcb97
commit 33298d0fad
10 changed files with 55 additions and 11 deletions

View File

@@ -44,7 +44,7 @@ extern "C" {
/*--------------------------------- GLOBALS ---------------------------------*/
#define kConfigPath "/usr/local/share/domo/"
/*! ----------------------------------------------------------------------------
* @fn setupUbus
@@ -87,23 +87,15 @@ static struct ubus_context *setupUbus (void)
int main (void)
{
int theRet = 0;
char *theWritePath;
std::string theDevicePath, theTimerPath;
struct ubus_context *theCtx = NULL;
theWritePath = getenv ("DOMO_WRITE_PATH");
if (theWritePath == NULL) {
fprintf (stderr, "you should export DOMO_WRITE_PATH. with the Path of data.\n");
return -1;
}
// Create Configs Paths...
theDevicePath = theWritePath;
theDevicePath = kConfigPath;
theDevicePath += "/Devices.json";
theTimerPath = theWritePath;
theTimerPath = kConfigPath;
theTimerPath += "/Timers.json";
//printf ("DOMO PATH: %s\n", thePath.c_str());