3 Einträge, 1 Seite |
undef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use Win32;
use Win32::OLE;
use Win32::Console qw();
use Win32::Daemon;
my $dir = dirname(__FILE__);
$cfg = new Config::IniFiles(-file=>"$dir/config.ini");
use Win32::Daemon::Simple
Service => 'ProcMon',
Name => 'ProcMon',
Version => '2.0.9',
Info => {display => 'ProcMon',
description => 'ProcessMonitoring',
user => '',
pwd => '',
interactive => 0,},
Params => { # the default parameters
Tick => 0,
Talkative => 0,
Interval => 1, # minutes
LogFile => "logfile.log",
Description => "My Desc."
},
Param_modify => {
LogFile => sub {File::Spec->rel2abs($_[0])},
Interval => sub {
no warnings;
my $interval = 0+$_[0];
die "The interval must be a positive number!\n"
unless $interval > 0;
return $interval},
Tick => sub {return ($_[0] ? 1 : 0)},
},
Run_params => {
};
# initialization
ServiceLoop(\&LoopPC);
#//-->ServiceLoop(\&test);
# cleanup
$cfg->DESTROY();
undef $cfg;
Log("Going down");
exit;
3 Einträge, 1 Seite |