1
0
Fork 0
mirror of https://github.com/dirtbags/moth.git synced 2025-01-08 04:51:06 -07:00
moth/packages/mcp/service/pointsd/pointsd

14 lines
276 B
Bash
Executable file

#! /bin/sh
fn=$2/$3
POINTS=/var/lib/ctf/points.log
SCOREBOARD=/var/www/scoreboard.html
cat $fn >> $POINTS || break
rm $fn
# Render scoreboard
if [ $POINTS -nt $SCOREBOARD ]; then
/opt/mcp/bin/scoreboard < $POINTS > $SCOREBOARD.new && mv $SCOREBOARD.new $SCOREBOARD
fi