This is an old revision of the document!
What jobs do the bots perform ?
The bots are small scripts which use the VHFFS API to perform the services creation/modification/destruction tasks.
Users enter their requests through the panel. This information is saved in the VHFFS database. Once the bots are running, they read the database and execute the requests.
Bots are located in /usr/lib/vhffs/bots/
To run a bot, just type:
Automatically run the bots
It is better to run the bots one by one, not that the bots were not designed to run in parallel, but if you do, you are going to run tens of process simultaneously which use I/O and CPU, which is kind of a bad idea, especially because you want the overall bot processing to be hitless for your hosting.
Create a bots_often script which is going to run bots that need to be run oftenly.
Edit /etc/vhffs/bots_often, here is an example:
#!/bin/sh for v in cron.pl cvs.pl dns.pl git.pl group.pl group_quota.pl mailinglist.pl mail.pl mercurial.pl mysql.pl pgsql.pl repository.pl repository_quota.pl svn.pl user.pl user_quota.pl usergroup.pl web.pl ; do "/usr/lib/vhffs/bots/$v" done
Then, create a bots_night script which is going to run bots that need to be run at night.
Edit /etc/vhffs/bots_night, here is an example:
#!/bin/sh for v in mysql_dump.pl pgsql_dump.pl mailinglist_mhonarc.pl object_cleanup.pl user_cleanup.pl ; do "/usr/lib/vhffs/bots/$v" done
Finally create and edit /etc/cron.d/vhffs, a cron file for VHFFS, here is an example:
# Crons for VHFFS */15 * * * * root ionice -c3 nice -n 10 /etc/vhffs/bots_often 5 3 * * * root ionice -c3 nice -n 10 /etc/vhffs/bots_night 0 0 * * * root ionice -c3 nice -n 10 /usr/lib/vhffs/bots/web_stats.pl 0 0 * * * root ionice -c3 nice -n 10 /usr/lib/vhffs/bots/repository_stats.pl