fix alpine-mirror / lighttpd root / stats script
All checks were successful
/ release-and-build (push) Successful in 23s
All checks were successful
/ release-and-build (push) Successful in 23s
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# make sure we never run 2 rsync at the same time
|
lockfile="/tmp/alpine-mirror.lock"
|
||||||
lockfile="/tmp/alpine-mirror.lock"
|
if [ -z "$flock" ] ; then
|
||||||
if [ -z "$flock" ] ; then
|
exec env flock=1 flock -n $lockfile "$0" "$@"
|
||||||
exec env flock=1 flock -n $lockfile "$0" "$@"
|
fi
|
||||||
fi
|
src=rsync://rsync.alpinelinux.org/alpine/
|
||||||
src=rsync://rsync.alpinelinux.org/alpine/
|
dest=/app/www/alpine/
|
||||||
dest=/app/www/alpine/
|
|
||||||
|
|
||||||
exclude="--exclude v2.* \
|
exclude="--exclude v2.* \
|
||||||
--exclude v3.0 \
|
--exclude v3.0 \
|
||||||
--exclude v3.1 \
|
--exclude v3.1 \
|
||||||
@@ -34,14 +33,14 @@ exclude="--exclude v2.* \
|
|||||||
--exclude edge \
|
--exclude edge \
|
||||||
--exclude latest"
|
--exclude latest"
|
||||||
|
|
||||||
mkdir -p "$dest"
|
mkdir -p "$dest"
|
||||||
/usr/bin/rsync \
|
/usr/bin/rsync \
|
||||||
--archive \
|
--archive \
|
||||||
--update \
|
--update \
|
||||||
--hard-links \
|
--hard-links \
|
||||||
--delete \
|
--delete \
|
||||||
--delete-after \
|
--delete-after \
|
||||||
--delay-updates \
|
--delay-updates \
|
||||||
--timeout=600 \
|
--timeout=600 \
|
||||||
$exclude \
|
$exclude \
|
||||||
"$src" "$dest"
|
"$src" "$dest"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
server.document-root = "/app/www/alpine"
|
server.document-root = "/app/www/"
|
||||||
|
|
||||||
server.port = 80
|
server.port = 80
|
||||||
|
|
||||||
|
|||||||
4
root/defaults/stats
Normal file → Executable file
4
root/defaults/stats
Normal file → Executable file
@@ -16,7 +16,7 @@ generate_index() {
|
|||||||
<body>
|
<body>
|
||||||
<table border="0">
|
<table border="0">
|
||||||
<tr><td><img src="summary.png" alt="summary"></td><td><img src="hours.png" alt="hours"></td></tr>
|
<tr><td><img src="summary.png" alt="summary"></td><td><img src="hours.png" alt="hours"></td></tr>
|
||||||
<tr><td rowspan="2"><img src="days.png" alt="days"></td><td><img src="top10.png" alt="top10"></td></tr>
|
<tr><td rowspan="2"><img src="days.png" alt="days"></td></tr>
|
||||||
<tr><td><img src="months.png" alt="months"></td></tr>
|
<tr><td><img src="months.png" alt="months"></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
@@ -29,6 +29,6 @@ if [ ! -f "$output"/index.html ]; then
|
|||||||
generate_index > "$output"/index.html
|
generate_index > "$output"/index.html
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for type in hours days months top10 summary hsummary vsummary; do
|
for type in hours days months summary hsummary vsummary; do
|
||||||
vnstati --${type} -i $nic -o $output/${type}.png
|
vnstati --${type} -i $nic -o $output/${type}.png
|
||||||
done
|
done
|
||||||
Reference in New Issue
Block a user