![]() ![]() |
hotsanic |
Subversion Repositories: |
Compare with Previous - Blame - Download
The script "read-data.pl" is quite small. It just imports the HotSaNICmod.pm library and calls its init function.Everything else happens then in HotSaNICmod::init.---------- BEGIN CODE ----------#!/usr/bin/env perluse warnings;use diagnostics;$|=1;use lib "../../lib";use HotSaNICmod;HotSaNICmod::init(@ARGV);---------- END CODE ----------The init() function will now import the module's "common.pm" library, parse the settings file and check the commandline arguments that have been passed to the script and act accordingly.Currently the following parameters are accepted:argument function--------- --------------------------------------------------start start module daemonstop terminate module daemonstatus show status of module daemonconfigure running daemon will re-read its config filesample running daemon will sample instantlyupdate not implemented yet(the idea is to save time by doing bulk updates shortly beforediagram generation instead of updating the DBs every 10 seconds)version show version of OS-dependant module usedshowargs show settings hash