मैं एक डिजिटल ओशन VPS पर Ubuntu 14.04 LTS और nginx चला रहा हूं और कभी-कभी एक असफल क्रॉन जॉब के बारे में ये ईमेल प्राप्त करता हूं:
विषय
क्रोन टेस्ट -x / usr / sbin / anacron || (cd / && रन-पार्ट्स --report /etc/cron.daily)
ईमेल का मुख्य भाग है:
/etc/cron.daily/logrotate: error: '/var/log/nginx/*.log' रन-पार्टस के लिए साझा की गई पोस्टरोट स्क्रिप्ट चलाने में त्रुटि: /etc/cron.daily/logrotate रिटर्न कोड 1 से बाहर निकली
मैं इसे कैसे हल कर सकता हूं इस पर कोई विचार?
अपडेट करें:
/var/log/nginx/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 0640 www-data adm
sharedscripts
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
fi
endscript
postrotate
invoke-rc.d nginx rotate >/dev/null 2>&1
endscript
}
अपडेट करें:
$ sudo invoke-rc.d nginx rotate
initctl: invalid command: rotate
Try `initctl --help' for more information.
invoke-rc.d nginx rotateविफल हो रहा है, उचित उपयोगकर्ता के रूप में चलाने का प्रयास करें, और हमें उस स्क्रिप्ट को भी दिखाएं, आउटपुट को अपने मूल प्रश्न में पेस्ट करें। टी.के.एस।
/etc/logrotate.d/nginixस्क्रिप्ट दिखाएं