S
S
Sergey Sashkin2018-11-20 16:02:03
linux
Sergey Sashkin, 2018-11-20 16:02:03

What about the script for logrotate?

Guys help pliz set a task of this type:

task, you need to write a script that I would copy to the ruby ​​log folder and run with the log name parameter in this folder.
by default, let the log be production.log
and the script added a configuration to the log-rotatet so that this file does not grow more than 100 MB.
but the script did not create duplicates in the config.
maybe even restart logrotate at the same time.
let it run under root.
head script

Guys, I'm with a bash on you, so I'll forgive the help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Radjah, 2018-11-20
@Radjah

man logrotate
Even with examples.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question