diff options
Diffstat (limited to 'src/cron')
-rwxr-xr-x | src/cron/counter.sh | 4 | ||||
-rwxr-xr-x | src/cron/gitjoe.pl | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cron/counter.sh b/src/cron/counter.sh index f3a7656..f9fc80a 100755 --- a/src/cron/counter.sh +++ b/src/cron/counter.sh @@ -5,6 +5,8 @@ destfile='/usr/local/www/jozan/index.html' foretext='Unique visitors: ' tmp=$(mktemp) -sed "s/$foretext.*$/$foretext$(awk '{print $1}' $logfile | sort | uniq | wc -l | tr -d ' ')/" $destfile >"$tmp" +[ -e $logfile ] || exit 1 +[ -e $destfile ] || exit 1 +sed "s/$foretext.*$/$foretext<b>$(awk '{print $1}' $logfile | sort | uniq | wc -l | tr -d ' ')<\/b>/" $destfile >"$tmp" || rm "$tmp" cat "$tmp" >$destfile rm "$tmp" diff --git a/src/cron/gitjoe.pl b/src/cron/gitjoe.pl index bb668b2..07c8fc4 100755 --- a/src/cron/gitjoe.pl +++ b/src/cron/gitjoe.pl @@ -66,7 +66,7 @@ sub stagit_generate { system( '/usr/local/bin/dash', '-c', - "/usr/local/bin/gsed -i 's/<td><span class=\"desc\">Repositories<\\/span><\\/td>/<td><span class=\"desc\"><h1>" . $user . " - Repositories<\\/h1><\\/span><\\/td><\\/tr><tr><td><\\/td><td>Back to <a href=\"https:\\/\\/git.jozanofastora.xyz\\/\">GitJoe<\\/a><\\/td><\\/tr>/' index.html" + "/usr/local/bin/gsed -i 's/<td><span class=\"desc\">Repositories<\\/span><\\/td>/<td><span class=\"desc\"><h1>" . $user . " - Repositories<\\/h1><\\/span><\\/td><\\/tr><tr><td><\\/td><td>Back to <a href=\"https:\\/\\/gitjoe.xyz\\/\">GitJoe<\\/a><\\/td><\\/tr>/' index.html" ); system( '/usr/local/bin/dash', |