Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
deployer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Sistemisti
deployer
Commits
a12d1130
Commit
a12d1130
authored
Oct 06, 2023
by
Mattia Rizzolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stats: handle websites with no logs and no history
Signed-off-by:
Mattia Rizzolo
<
mapreri@ubuntu.com
>
parent
68477183
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
scripts/stats.ubuntu-it.org
scripts/stats.ubuntu-it.org
+6
-1
No files found.
scripts/stats.ubuntu-it.org
View file @
a12d1130
...
...
@@ -32,7 +32,12 @@ for dir in "${logdirs[@]}"; do
echo
"Generating stats for
${
sitename
}
..."
if
[[
!
-s
"
$dir
/access.log"
]]
;
then
echo
"+ access.log for
$sitename
is empty, reusing the last analysis."
cp
"/srv/stats.ubuntu-it.org/current/
${
sitename
}
.html"
"
${
deploy
}
/
${
sitename
}
.html"
oldfile
=
"/srv/stats.ubuntu-it.org/current/
${
sitename
}
.html"
if
[
-f
"
$oldfile
"
]
;
then
cp
"
$oldfile
"
"
${
deploy
}
/
${
sitename
}
.html"
else
echo
"+ previous file for
$sitename
not available, probably a very new website."
fi
continue
fi
# blackhole stderr because that's where the progress counter goes,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment