Changeset 37857c4c91096e325fa1d70b9d1ea78ab5c7f15d
- Timestamp:
- 03/23/07 22:08:36
(6 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1174687716 +0000
- git-parent:
[ae5283c7e99faf2b995945c770a82f65747b3616]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1174687716 +0000
- Message:
support PORT and INTERFACE in the config
git-svn-id: https://labs.omniti.com/resmon/trunk@34 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rc43001e |
r37857c4 |
|
| 41 | 41 | next; |
|---|
| 42 | 42 | } |
|---|
| | 43 | elsif(/\S*PORT\s+(\d+)\s*;\s*/) { |
|---|
| | 44 | $self->{port} = $1; |
|---|
| | 45 | next; |
|---|
| | 46 | } |
|---|
| | 47 | elsif(/\S*INTERFACE\s+(\S+)\s*;\s*/) { |
|---|
| | 48 | $self->{interface} = $1; |
|---|
| | 49 | next; |
|---|
| | 50 | } |
|---|
| 43 | 51 | elsif(/\s*INTERVAL\s+(\d+)\s*;\s*/) { |
|---|
| 44 | 52 | $self->{interval} = $1; |
|---|
| rae5283c |
r37857c4 |
|
| 33 | 33 | $config = Resmon::Config->new($config_file); |
|---|
| 34 | 34 | $config->{statusfile} = $status_file if($status_file); |
|---|
| | 35 | $config->{port} = $port if($port); |
|---|
| | 36 | $config->{interface} = $interface if($interface); |
|---|
| 35 | 37 | } |
|---|
| 36 | 38 | |
|---|
| … | … | |
| 64 | 66 | my $status = Resmon::Status->new($config->{statusfile}); |
|---|
| 65 | 67 | $status->open(); |
|---|
| 66 | | $status->serve_http_on($interface, $port) if($port); |
|---|
| | 68 | $status->serve_http_on($config->{interface}, $config->{port}) |
|---|
| | 69 | if($config->{port}); |
|---|
| 67 | 70 | |
|---|
| 68 | 71 | while(1) { |
|---|