You are not logged in.

#1 2004-11-18 19:53:56

zmeyski
Member
From: Burgas, Bulgaria
Registered: 2004-09-15
Posts: 9

vnStat - problem with dcron

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

#2 2004-12-08 11:38:28

Lugash
Member
Registered: 2004-11-05
Posts: 14

Re: vnStat - problem with dcron

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. smile

Offline

Board footer

Powered by FluxBB