- - PR -
シスログローテーション直後にスクリプトを実行
1
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2004-12-22 12:02
/etc/logrotate.d/syslogを覗くと、
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron{ sharedscripts postrotate /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true endscript } となっていますが、各ファイルのローテーション直後にあるスクリプト(aru.sh)を実行したいのですが、このファイルにどう記述、あるいはどうすれば良いのでしょうか。(redhat linuxです) |
|
投稿日時: 2004-12-22 13:02
man 8 lograte
の表示より、抜粋。 postrotate/endscript The lines between postrotate and endscript (both of which must appear on lines by themselves) are exe- cuted after the log file is rotated. These direc- tives may only appear inside of a log file defini- tion. See prerotate as well. というわけで、postrotate と endscript の間に行を挿入するとよいのでわ。 |
|
投稿日時: 2004-12-22 13:13
ぽんす殿
この度は、有難う御座いました。 スレッドの件、了解しました。 試してみます。 |
1