From 194d64008437c7cc9c8ba2fba80945c7be451605 Mon Sep 17 00:00:00 2001 From: Justin Hammond Date: Sat, 24 Oct 2015 01:39:12 +0800 Subject: [PATCH] fix up these perms for now --- scripts/lmbd.service | 4 ++-- scripts/zabbix-stats.service | 4 ++-- src/Driver-DX.cpp | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/lmbd.service b/scripts/lmbd.service index c527c79..aacbd16 100644 --- a/scripts/lmbd.service +++ b/scripts/lmbd.service @@ -5,8 +5,8 @@ After=network.target [Service] Type=simple -User=nobody -Group=nobody +User=root +Group=root ExecStart=/usr/bin/LMBd --config /etc/LMBd.conf # Give the script some time to startup diff --git a/scripts/zabbix-stats.service b/scripts/zabbix-stats.service index c64487b..bce999f 100644 --- a/scripts/zabbix-stats.service +++ b/scripts/zabbix-stats.service @@ -6,8 +6,8 @@ Requires=lmbd.service [Service] Type=simple -User=nobody -Group=nobody +User=root +Group=root ExecStart=/usr/bin/python /usr/bin/zabbix_stats.py -c /etc/zabbix_stats.cfg # Give the script some time to startup diff --git a/src/Driver-DX.cpp b/src/Driver-DX.cpp index 7de4f3b..ae77fee 100644 --- a/src/Driver-DX.cpp +++ b/src/Driver-DX.cpp @@ -272,9 +272,10 @@ bool Driver_DX::StartUp() { std::stringstream ss; time_t t = time(NULL); tm* timePtr = localtime(&t); - uint8_t setTime[] = { 0x02, 0x34, InsertString(timePtr->tm_year -100), InsertString(timePtr->tm_mon +1), InsertString(timePtr->tm_mday), InsertString(timePtr->tm_hour), InsertString(timePtr->tm_min), InsertString(timePtr->tm_sec), InsertString(timePtr->tm_wday), 0x00 }; - doChkSum(&setTime[0], 9); - int sent = (int)this->lmbctx->sp->write(setTime, 10); +/* uint8_t setTime[10] = { 0x02, 0x34, InsertString(timePtr->tm_year -100), InsertString(timePtr->tm_mon +1), InsertString(timePtr->tm_mday), InsertString(timePtr->tm_hour), InsertString(timePtr->tm_min), InsertString(timePtr->tm_sec), InsertString(timePtr->tm_wday), 0x00 }; +# doChkSum(&setTime[0], 9); +# int sent = (int)this->lmbctx->sp->write(setTime, 10); LMB_LOG_DEBUG() << "Set Clock: " << std::dec << sent; +*/ return true; }