diff --git a/lib/api/source/deploy.php b/lib/api/source/deploy.php index cceddd1..1f2a915 100755 --- a/lib/api/source/deploy.php +++ b/lib/api/source/deploy.php @@ -180,10 +180,8 @@ $exec = api_deploy($is_init); - if( $exec == 0 ) - slog('Deployment successfully achieved', 'main', 'update'); - else - slog('Deployment failed', 'main', 'update'); + if( $exec == 0 ) slog('Success', 'api:deploy', 'update'); + else slog('Failure', 'api:deploy', 'update'); echo $exec; die($exec); diff --git a/lib/api/source/init.php b/lib/api/source/init.php index 5c26d5d..141a22f 100755 --- a/lib/api/source/init.php +++ b/lib/api/source/init.php @@ -170,6 +170,10 @@ $exec = api_init(); + + if( $exec == 0 ) slog('Success', 'api:init', 'update'); + else slog('Failure', 'api:init', 'update'); + echo $exec; die($exec); diff --git a/lib/api/source/sync.php b/lib/api/source/sync.php index c1da740..3ea5c08 100755 --- a/lib/api/source/sync.php +++ b/lib/api/source/sync.php @@ -28,7 +28,7 @@ /* (3) Try new hash if available */ $new_hash = syscall(SOURCE_DIR.'/lib/cyclic-hash/new'); - + if( $new_hash === false ){ slog("cyclic-hash:new returned $new EXIT_STATUS", 'api:sync','update'); return 127; @@ -43,7 +43,7 @@ } - + /* [2] Create httpRequest base =========================================================*/ @@ -98,7 +98,7 @@ /* (2) Close request */ curl_close($curl); - + /* (3) Return response as result */ if( $response === false ){ slog("Request error", 'api:sync','update'); @@ -142,17 +142,21 @@ =========================================================*/ /* (1) Manage response deployement */ $deploy = syscall(SOURCE_DIR.'/lib/api/deploy'); - + /* (2) Return state */ return ($deploy === true) ? 0 : 127; - + } $exec = api_request(); + + if( $exec == 0 ) slog('Success', 'api:sync', 'update'); + else slog('Failure', 'api:sync', 'update'); + echo $exec; die($exec); - - + + ?>