#!/bin/sh
# This is the crontab script for ekg.
#
# Please change the following path to your ekg-directory.

EKGPATH=/home/users/user/.gg

# the rest should be kept as is

fuser ~/.gg/ekgc > ~/.gg/pid.p
sed 's|/home/users/user/.gg/ekgc: ||' ~/.gg/pid.p > ~/.gg/ekg.pid
    EKGPID=$(cat $EKGPATH/ekg.pid)
    if $(kill -CHLD $EKGPID >/dev/null 2>&1)
    then
	exit 0
    fi
cd ~/
export "LC_ALL"="pl_PL"
export "LANG"="pl_PL"
screen -wipe
screen -d -m ekg/ekg -c ~/.gg/ekgc