This commit is contained in:
xdrm-brackets 2017-05-09 12:27:09 +02:00
parent 1cd9ff45f7
commit 50739a1f30
3 changed files with 17 additions and 11 deletions

View File

@ -180,10 +180,8 @@
$exec = api_deploy($is_init); $exec = api_deploy($is_init);
if( $exec == 0 ) if( $exec == 0 ) slog('Success', 'api:deploy', 'update');
slog('Deployment successfully achieved', 'main', 'update'); else slog('Failure', 'api:deploy', 'update');
else
slog('Deployment failed', 'main', 'update');
echo $exec; echo $exec;
die($exec); die($exec);

View File

@ -170,6 +170,10 @@
$exec = api_init(); $exec = api_init();
if( $exec == 0 ) slog('Success', 'api:init', 'update');
else slog('Failure', 'api:init', 'update');
echo $exec; echo $exec;
die($exec); die($exec);

View File

@ -28,7 +28,7 @@
/* (3) Try new hash if available */ /* (3) Try new hash if available */
$new_hash = syscall(SOURCE_DIR.'/lib/cyclic-hash/new'); $new_hash = syscall(SOURCE_DIR.'/lib/cyclic-hash/new');
if( $new_hash === false ){ if( $new_hash === false ){
slog("cyclic-hash:new returned $new EXIT_STATUS", 'api:sync','update'); slog("cyclic-hash:new returned $new EXIT_STATUS", 'api:sync','update');
return 127; return 127;
@ -43,7 +43,7 @@
} }
/* [2] Create httpRequest base /* [2] Create httpRequest base
=========================================================*/ =========================================================*/
@ -98,7 +98,7 @@
/* (2) Close request */ /* (2) Close request */
curl_close($curl); curl_close($curl);
/* (3) Return response as result */ /* (3) Return response as result */
if( $response === false ){ if( $response === false ){
slog("Request error", 'api:sync','update'); slog("Request error", 'api:sync','update');
@ -142,17 +142,21 @@
=========================================================*/ =========================================================*/
/* (1) Manage response deployement */ /* (1) Manage response deployement */
$deploy = syscall(SOURCE_DIR.'/lib/api/deploy'); $deploy = syscall(SOURCE_DIR.'/lib/api/deploy');
/* (2) Return state */ /* (2) Return state */
return ($deploy === true) ? 0 : 127; return ($deploy === true) ? 0 : 127;
} }
$exec = api_request(); $exec = api_request();
if( $exec == 0 ) slog('Success', 'api:sync', 'update');
else slog('Failure', 'api:sync', 'update');
echo $exec; echo $exec;
die($exec); die($exec);
?> ?>