summaryrefslogtreecommitdiff
path: root/bin/nr_r3
blob: d0b4c08d8c4742a0b07c8a52dac7f5e56d8edfc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

while [ 1 ]; do
	count=`ls -l core.* |wc -l`
        echo $count
        if [ $count -lt 5 ]
        then
                echo "set unlimited"
                ulimit -c unlimited
        else
                ulimit -c 0
        fi

	./web_focus > log/screen.log 2>&1
	echo program crashed, restart at `date +"%w %Y/%m/%d, %H:%M:%S"` >> RESTART.log
    sleep 10
done