Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > ce69addb0fa270d8f4b2ee8988c2fff2 > files > 4

atop-2.0.2-3.mga4.x86_64.rpm

# Logrotate file to take action after psacct is rotated
/var/log/atop/dummy_after {
    missingok
    daily
    rotate 1
    ifempty
    create 0600 root root
    postrotate
	if [ -e /etc/logrotate.d/psacct ]
	then
	    # if the atop daemon does not run, restart it after
	    # accounting file is rotated
	    PIDFILE=/var/run/atop.pid

	    if [ -e $PIDFILE ] && \
			ps -p `cat $PIDFILE` | grep 'atop$' > /dev/null
	    then
	        :
	    else
	        /etc/atop/atop.daily
	    fi
	fi
    endscript
}