mirror of
https://github.com/caprover/caprover
synced 2025-10-30 10:07:01 +00:00
Some end to end flow working
This commit is contained in:
@@ -2,10 +2,18 @@ currentDateTime=$(date +"%Y-%m-%dT%H:%M")
|
||||
|
||||
for logFile in /var/log/nginx-shared/*.log; do
|
||||
|
||||
# Ensure the log isn't empty
|
||||
if [ -s $logFile ]; then
|
||||
|
||||
rotatedLog="$logFile-$currentDateTime.log"
|
||||
report="$logFile-$currentDateTime.html"
|
||||
filename=$(basename "$logFile")
|
||||
appName=${filename%%--*}
|
||||
appPath="/var/log/nginx-shared/$appName"
|
||||
|
||||
# Make directory for all the reports to live in
|
||||
mkdir -p $appPath
|
||||
|
||||
rotatedLog="$logFile--$currentDateTime.log"
|
||||
report="$appPath/$filename--$currentDateTime.html"
|
||||
|
||||
if [ -f "$report" ]; then
|
||||
echo "$report already exists, skipping"
|
||||
|
||||
Reference in New Issue
Block a user