This file is indexed.

config is in uptimed 1:0.3.17-4.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#! /usr/bin/perl -w

use strict;

use Debconf::Client::ConfModule ':all';

version('2.0');
my $capb = capb('backup');

my $sendmails = 0;
my $havemilestones = 0;

# Step 1: Put the current settings into the DebConf database
#         Invalid values are ignored

if (open(CONFIG, '/etc/uptimed.conf')) {
	while(<CONFIG>) {
		chomp;
		(/^UPDATE_INTERVAL=[0-9]*/) && do {
			s/^UPDATE_INTERVAL=//;
			set('uptimed/interval', $_); };
		(/^MAX_ENTRIES=[0-9]*/) && do {
			s/^MAX_ENTRIES=//;
			set('uptimed/maxrecords', $_); };
		(/^EMAIL=[a-zA-Z0-9.-]+@[a-zA-Z0-9.%-]+/) && do {
			s/^EMAIL=//;
			set('uptimed/mail/address', $_); };
		(/^SEND_EMAIL=/) && do {
			s/^SEND_EMAIL=//;
			if($_ > 0) {
				$sendmails = $_;
			} else {
				$sendmails = 0;
			} };
	};
	if ($sendmails == 1) {
		set('uptimed/mail/do_mail', 'Both');
	} else {if ($sendmails == 2) {
		set('uptimed/mail/do_mail', 'Milestone');
	} else {if ($sendmails == 3) {
		set('uptimed/mail/do_mail', 'Record');
	} else {
		set('uptimed/mail/do_mail', 'Never');
	}; }; };
};

# Step 2: Ask the user whether he wants to change something

my $state = 1;

while(($state > 0) && ($state <= 5)) {
	($state == 1) && input('medium', 'uptimed/maxrecords');
	($state == 2) && input('medium', 'uptimed/mail/do_mail');
	($state == 3) && (get('uptimed/mail/do_mail') ne 'Never') &&
		input('medium', 'uptimed/mail/address');
	($state == 4) && (get('uptimed/mail/do_mail') eq 'Both') &&
		input('medium', 'uptimed/mail/milestones_info');
	($state == 5) && input('low', 'uptimed/interval');

	my @ret = go;

	if($ret[0] == 30) {
		$state -= 1;
	} else {
		$state += 1;
	}
}

stop;