From 70fd711003c6e8053edc9ba287b1a276499588de Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 27 Jan 2017 21:00:06 +0100 Subject: [PATCH] Fixed log (.log at the end) + fetch management to do --- lib/api/deploy | 3 +++ lib/api/fetch | 3 +++ lib/api/source/fetch.php | 21 +++++++++++++++++++++ lib/include/func | 2 +- 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 lib/api/deploy create mode 100755 lib/api/fetch create mode 100755 lib/api/source/fetch.php diff --git a/lib/api/deploy b/lib/api/deploy new file mode 100755 index 0000000..325c5da --- /dev/null +++ b/lib/api/deploy @@ -0,0 +1,3 @@ +#!/bin/sh + +php $(realpath $(dirname $0))/source/deploy.php; diff --git a/lib/api/fetch b/lib/api/fetch new file mode 100755 index 0000000..d0b1d8d --- /dev/null +++ b/lib/api/fetch @@ -0,0 +1,3 @@ +#!/bin/sh + +php $(realpath $(dirname $0))/source/fetch.php; diff --git a/lib/api/source/fetch.php b/lib/api/source/fetch.php new file mode 100755 index 0000000..1bd4608 --- /dev/null +++ b/lib/api/source/fetch.php @@ -0,0 +1,21 @@ + file_get_contents(LOG_DIR.'/access.log') + ]; + + + } + + echo api_fetch(); + + + +?> diff --git a/lib/include/func b/lib/include/func index 2626831..59dbc10 100755 --- a/lib/include/func +++ b/lib/include/func @@ -23,7 +23,7 @@ =========================================================*/ function slog($message="unknown error...", $feature="default", $flag="daemon"){ - file_put_contents(LOG_DIR."/$flag", time()." [$feature] $message\n", FILE_APPEND); + file_put_contents(LOG_DIR."/$flag.log", time()." [$feature] $message\n", FILE_APPEND); }