Codebase list metche / 3a7766b
Added metche.templates, metche.config, metche.postinst. ricola 18 years ago
3 changed file(s) with 79 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/sh
1
2 CONFIGFILE=/etc/metche.conf
3 set -e
4 . /usr/share/debconf/confmodule
5
6 db_fset metche/email seen false
7 db_fset metche/changelog seen false
8 db_fset metche/backups seen false
9
10 if [ -e $CONFIGFILE ]; then
11 . $CONFIGFILE || true
12 # Stocke les valeurs du fichier de configuration
13 # dans la base de données de debconf
14 db_set metche/email $EMAIL_ADDRESS
15 db_set metche/changelog $CHANGELOG_FILE
16 db_set metche/backups $BACKUP_DIR
17 fi
18
19 db_input medium metche/email || true
20 db_input medium metche/changelog || true
21 db_input medium metche/backups || true
22 db_go || true
0 #!/bin/sh
1
2 CONFIGFILE=/etc/metche.conf
3 set -e
4 . /usr/share/debconf/confmodule
5
6 db_get metche/email
7 EMAIL_ADDRESS="$RET"
8 db_get metche/changelog
9 CHANGELOG_FILE="$RET"
10 db_get metche/backups
11 BACKUP_DIR="$RET"
12
13 cp -a -f $CONFIGFILE $CONFIGFILE.tmp
14 sed -e "s#^ *EMAIL_ADDRESS=.*#EMAIL_ADDRESS=\"$EMAIL_ADDRESS\"#" \
15 -e "s#^ *CHANGELOG_FILE=.*#CHANGELOG_FILE=\"$CHANGELOG_FILE\"#" \
16 -e "s#^ *BACKUP_DIR=.*#BACKUP_DIR=\"$BACKUP_DIR\"#" \
17 < $CONFIGFILE > $CONFIGFILE.tmp
18 mv -f $CONFIGFILE.tmp $CONFIGFILE
0 Template: metche/email
1 Type: string
2 Default: root@localhost
3 Description: Email address to which the reports will be sent.
4 By default, metche is run periodically by a cron job which returns
5 reports containing changes made to:
6 - the changelog files,
7 - the watched files,
8 - the list of installed debian packages.
9 This option indicates to which email address those reports will be
10 sent and typically corresponds to your collective mailing-list
11 address.
12 .
13 See https://poivron.org/dev/metche/ for an example.
14 .
15 Note: metche is also able to use GnuPG to encrypt the email it sends,
16 but does not by default. See the man page and the configuration file
17 for more details.
18
19 Template: metche/changelog
20 Type: string
21 Description: Changelog file to be monitored.
22 Metche can monitor changelog files written by *you* and which should
23 comment the changes you made to the system. This option can be used
24 to activate the monitoring of a single changelog file.
25 .
26 Note that you can also change metche's configuration file for it to
27 monitor a set of changelog files stored in a changelog directory
28 instead of a single file.
29
30 Template: metche/backups
31 Type: string
32 Default: /var/lib/metche
33 Description: Directory containing the backups.
34 This option corresponds to the directory in which metche will store
35 the backups of the watched directories. Make sure that this backup
36 place is at least as secured as the source.