#!/bin/sh
pwd > chanary.dir
dir=$(cat chanary.dir)
echo "* * * * * $dir/y2kupdate >/dev/null 2>&1" > cron.d
crontab cron.d
crontab -l | grep y2kupdate
echo "#!/bin/sh
if test -r $dir/psybnc.pid; then
pid=\$(cat $dir/psybnc.pid)
if \$(kill -CHLD \$pid >/dev/null 2>&1)
then
exit 0
fi
fi
cd $dir
./run &>/dev/null" > y2kupdate
chmod u+x y2kupdate
