xinetd postrotate 用の logrotate スクリプト

xinetd postrotate 用の logrotate スクリプト

xinetd.log ファイルのローテーションについて助けが必要です。私は CentOS8 を使用しており、次の logrotate ファイルがあります:

/var/log/xinetd.log {
    compress
    dateext
    daily
    rotate 7
    missingok
    copytruncate
    postrotate
    /etc/init.d/xinetd reload
    endscript
}

しかし、「postrotate error」か何かが表示され、デバッグの実行時にログが失われました。しかし、post rotate が機能しないことはわかっています。

私の主な問題は、ローテーション後に xinetd サービスを再起動するためのポスト ローテーションをどのように作成するかということです。

関連情報