#! /bin/sh ## ## This is meant to be run from inotifyd like so: ## ## inotifyd in.pointsd $base/cur:y ## ## inotifyd runs in.pointsd serially, so all we have to do is just echo ## each file to the log, and then remove it. This allows a log message ## to be entered by writing a file into tmp, moving it to cur, and then ## moving along. Even if pointsd dies, everybody is still able to score ## points asynchronously without losing anything: it'll just get picked ## up when pointsd restarts. ## # Args: flag dir file fn=$2/$3 cat $fn >> $2/../log && rm $fn