class Bard::Provision::LogRotation
install log rotation if missing
Public Instance Methods
Source
# File lib/bard/provision/logrotation.rb, line 4 def call print "Log Rotation:" provision_server.run! <<~BASH, quiet: true file=/etc/logrotate.d/#{server.project_name} if [ ! -f $file ]; then sudo tee $file > /dev/null <<EOF $(pwd)/log/*.log { weekly size 100M missingok rotate 52 delaycompress notifempty copytruncate create 664 www www } EOF fi BASH puts " ✓" end