]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
Fix reporting time taken to generate freshness report
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 4 Jan 2019 11:55:14 +0000 (20:55 +0900)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 4 Jan 2019 11:55:14 +0000 (20:55 +0900)
wwwbin/freshness.sh

index 464665085dd54b8650ff60f7c79f8657f1d5f91a..9fbdb2d7fae221a3b7902669feb833458ff6b97d 100755 (executable)
@@ -1,6 +1,12 @@
 #!/bin/sh
+
+export LC_ALL=C
+
 date > $HOME/www/freshness.txt.new
-/usr/bin/time -f '\nElapsed time: %E' $HOME/bin/ftp-freshness.py >> $HOME/www/freshness.txt.new 2>&1
-chmod 644 $HOME/www/freshness.txt.new
-mv $HOME/www/freshness.txt.new $HOME/www/freshness.txt
+/usr/bin/time -f '\nElapsed time: %E' -o $HOME/www/freshness.txt.time $HOME/bin/ftp-freshness.py >> $HOME/www/freshness.txt.new 2>/dev/null
 
+cat $HOME/www/freshness.txt.time >>$HOME/www/freshness.txt.new
+rm -f $HOME/www/freshness.txt.time
+
+mv $HOME/www/freshness.txt.new $HOME/www/freshness.txt
+chmod 644 $HOME/www/freshness.txt
This page took 0.087515 seconds and 4 git commands to generate.