rotatelog.sh

rotate log implementation by sh