Codebase list atop / 06537844-f160-4183-b32b-561924374666/main psaccu_atop
06537844-f160-4183-b32b-561924374666/main

Tree @06537844-f160-4183-b32b-561924374666/main (Download .tar.gz)

psaccu_atop @06537844-f160-4183-b32b-561924374666/mainraw · history · blame

# Logrotate file to take action after psacct is rotated
/var/log/atop/dummy_after {
    missingok
    daily
    rotate 0
    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
	        /usr/share/atop/atop.daily&
	    fi
	fi
    endscript
}