#!/bin/sh -efu

PROG="${0##*/}"

case "$1" in
    start)
        /usr/lib/nagwad/nagwad.sh &
        ;;
    stop)
        cat /var/run/nagwad.pid | xargs  pkill -TERM  -P
        ;;
    *)
        echo "Usage: $PROG start | stop" >&2
        exit 1
esac
