From ef4b7b76050a6fd8870f57a96ebe761302854f7b Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 28 Jan 2017 11:45:09 +0100 Subject: [PATCH] pre-Fix --- lib/api/source/fetch.php | 7 ++++++- lib/include/const | 6 +++++- update | 6 +++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/api/source/fetch.php b/lib/api/source/fetch.php index 1bd4608..917edaf 100755 --- a/lib/api/source/fetch.php +++ b/lib/api/source/fetch.php @@ -8,8 +8,13 @@ =========================================================*/ /* (1) Default data : access */ $data = [ - 'access' => file_get_contents(LOG_DIR.'/access.log') + 'access' => file_get_contents(DATA_DIR.'/access.dat'), + 'feature' => [] ]; + + /* (2) Fetch for each feature which generates data */ + + } diff --git a/lib/include/const b/lib/include/const index d496fa0..81d8226 100755 --- a/lib/include/const +++ b/lib/include/const @@ -5,12 +5,14 @@ # MAIN DIRECTORIES #define('ROOT_DIR', '/home/sats/satsd'); #define('LOG_DIR', ROOT_DIR.'/log'); + #define('DATA_DIR', ROOT_DIR.'/data'); #define('CONF_DIR', ROOT_DIR.'/conf'); #define('SOURCE_DIR', ROOT_DIR.'/source'); #define('TMP_DIR', ROOT_DIR.'/tmp'); define('ROOT_DIR', '/home/xdrm-brackets/SANDBOX/sats-local'); define('LOG_DIR', ROOT_DIR.'/log'); + #define('DATA_DIR', ROOT_DIR.'/data'); define('CONF_DIR', ROOT_DIR.'/conf'); define('TMP_DIR', ROOT_DIR.'/tmp'); define('SOURCE_DIR', '/home/xdrm-brackets/Desktop/git.xdrm.io/logauth-sats'); @@ -24,12 +26,14 @@ define('AUTH_CONF', CONF_DIR.'/auth.list'); # LOG FILES - define('ACCESS_LOG', CONF_DIR.'/access.log'); define('BOOT_LOG', CONF_DIR.'/boot.log'); define('DAEMON_LOG', CONF_DIR.'/daemon.log'); define('INSTALL_LOG', CONF_DIR.'/install-source.log'); define('UPDATE_LOG', CONF_DIR.'/update.log'); + # DATA FILES + define('ACCESS_DATA', DATA_DIR.'/access.data'); + # SETTINGS define('SECRET_SIZE', 250); diff --git a/update b/update index 880ad10..2772966 100755 --- a/update +++ b/update @@ -1,10 +1,10 @@ #!/bin/sh -# [1] Send logs + update configuration -php /home/sats/satsd/source/network/send_log; +# [1] Send data + fetch configuration +php /home/sats/satsd/source/network/sync; # [2] Update source -BRANCH=$(cat /home/sats/satsd/conf/branch); +BRANCH=$(cat /home/sats/satsd/conf/machine.branch); cd /home/sats/satsd/source/; git checkout $BRANCH;