You are not logged in.
Hi there,
I´m trying to package vnStat - a console-based network traffic monitor. The Problem is the post-install configuration - the program uses a cron-job to sync it´s database every 5 minutes and provides a file for that.
0-55/5 * * * * root if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ]; then /usr/bin/vnstat -u; fi
this gets installed in /etc/cron.d but it seems that Arch doesn´t use this directory for cron-jobs but cron.hourly etc. and the files in these directories have different format. So my Question is how do i setup dcron to execute a job every 5 minutes or to be more specific how to do the trick from within PKGBULD or install file:?:
Thanks for your answers and please excuse my bad english :?
Offline
I installed vnStat (great tool btw!) manually. I added the cronjob with
crontab -e
The cronjob for vnStat is now located in /etc/cron.d/vnstat. Here's the content
0-55/5 * * * * root if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ]; then /usr/bin/vnstat -u; fi
Maybe you can just add a file "cron.d/vnstat" in the package with the above line in it, and at the end of the installation copy the file into /etc and finally restart the cron daemon (if it's necessary).
Just a suggestion.
Offline