This commit is contained in:
xdrm-brackets 2017-01-28 11:45:09 +01:00
parent 70fd711003
commit ef4b7b7605
3 changed files with 14 additions and 5 deletions

View File

@ -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 */
}

View File

@ -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);

6
update
View File

@ -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;