Package list metche / 6d03fa3
Changed metche/changelog question to metche/changelog/type + metche/changelog/file + metche/changelog/directory questions.\nRemoved metche/backups question. ricola 15 years ago
3 changed file(s) with 58 addition(s) and 33 deletion(s). Raw diff Collapse all Expand all
33 set -e
44 . /usr/share/debconf/confmodule
55
6 db_fset metche/email seen false
7 db_fset metche/changelog seen false
8 db_fset metche/backups seen false
9
106 if [ -e $CONFIGFILE ]; then
117 . $CONFIGFILE || true
12 # Stocke les valeurs du fichier de configuration
13 # dans la base de données de debconf
148 db_set metche/email $EMAIL_ADDRESS
15 db_set metche/changelog $CHANGELOG_FILE
16 db_set metche/backups $BACKUP_DIR
9 if [ "$CHANGELOG_FILE" ]; then
10 db_set metche/changelog/file $CHANGELOG_FILE
11 fi
12 if [ "$CHANGELOG_DIR" ]; then
13 db_set metche/changelog/directory $CHANGELOG_DIR
14 fi
1715 fi
1816
19 db_input medium metche/email || true
20 db_input medium metche/changelog || true
21 db_input medium metche/backups || true
17 db_input medium metche/changelog/type || true
2218 db_go || true
19 db_get metche/changelog/type
20 case "$RET" in
21 "Single changelog file")
22 db_input medium metche/changelog/file || true
23 db_go || true
24 ;;
25 "Multiple changelog files")
26 db_input medium metche/changelog/directory || true
27 db_go || true
28 ;;
29 esac
55
66 db_get metche/email
77 EMAIL_ADDRESS="$RET"
8 db_get metche/changelog
9 CHANGELOG_FILE="$RET"
10 db_get metche/backups
11 BACKUP_DIR="$RET"
8 db_get metche/changelog/type
9 case "$RET" in
10 "Single changelog file")
11 db_get metche/changelog/file
12 CHANGELOG_FILE="$RET"
13 ;;
14 "Multiple changelog files")
15 db_get metche/changelog/directory
16 CHANGELOG_DIR="$RET"
17 ;;
18 esac
1219
1320 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
21 if [ "$CHANGELOG_FILE" ]; then
22 echo "single $RET"
23 sed -e "s/^ *EMAIL_ADDRESS=.*/EMAIL_ADDRESS=\"$EMAIL_ADDRESS\"/" \
24 -e "s@^[# ]*CHANGELOG_FILE=.*@CHANGELOG_FILE=\"$CHANGELOG_FILE\"@" \
25 -e "s@^[# ]*CHANGELOG_DIR@#CHANGELOG_DIR@" < $CONFIGFILE > $CONFIGFILE.tmp
26 fi
27 if [ "$CHANGELOG_DIR" ]; then
28 echo "multiple $RET"
29 sed -e "s/^ *EMAIL_ADDRESS=.*/EMAIL_ADDRESS=\"$EMAIL_ADDRESS\"/" \
30 -e "s@^[# ]*CHANGELOG_DIR=.*@CHANGELOG_DIR=\"$CHANGELOG_DIR\"@" \
31 -e "s@^[# ]*CHANGELOG_FILE@#CHANGELOG_FILE@" < $CONFIGFILE > $CONFIGFILE.tmp
32 fi
1833 mv -f $CONFIGFILE.tmp $CONFIGFILE
1616 but does not by default. See the man page and the configuration file
1717 for more details.
1818
19 Template: metche/changelog
19 Template: metche/changelog/type
20 Type: select
21 Choices: Single changelog file, Multiple changelog files
22 Description: Changelog monitoring type.
23 Metche monitors changelog files written by *you* and which should
24 comment the changes you made to the system. You can choose between
25 two different types of monitoring:
26 - Single changelog file monitoring or
27 - Multiple changelogs file monitoring, in which each "Changelog"
28 file in a sub-directory of a given directory will be monitored.
29
30 Template: metche/changelog/file
2031 Type: string
2132 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.
33 This option sets the path of the changelog file to be monitored.
2934
30 Template: metche/backups
35 Template: metche/changelog/directory
3136 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.
37 Description: Changelog directory to be monitored.
38 This option sets the path of the changelog directory. Each
39 "Changelog" file should be in a sub-directory of this directory.