summaryrefslogtreecommitdiff
path: root/mail/sympa/files/pkg-install.in
blob: e10e0ca1445bfdc57740930ddff6c2ed66088f21 (plain)
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
#!/bin/sh

if [ "$2" = "POST_INSTALL" ]; then
	if [ ! -f %%ETCDIR%%/sympa.conf -o ! -f %%ETCDIR%%/data_structure.version ]; then
		cp -p %%ETCDIR%%/sympa.conf.sample %%ETCDIR%%/sympa.conf
		chmod u+w %%ETCDIR%%/sympa.conf
	else
		if [ $(tail -1 %%ETCDIR%%/data_structure.version | cut -d. -f3) -lt 2 ]; then
			echo "It seems you are upgrading from version <6.2 ($(cat %%ETCDIR%%/data_structure.version))"
			echo "You'll have to read https://sympa-community.github.io/manual/upgrade/notes.html and (at least) run:"
			echo " # %%PREFIX%%/libexec/sympa/sympa.pl --upgrade_config_location"
			echo " # %%PREFIX%%/libexec/sympa/sympa.pl --upgrade"
			echo " # %%PREFIX%%/libexec/sympa/upgrade_bulk_spool.pl"
			echo " # %%PREFIX%%/libexec/sympa/upgrade_send_spool.pl"
			echo "to update your config files to the new layout"
		else
			echo "to upgrade, run:"
			echo " # %%PREFIX%%/libexec/sympa/sympa.pl --upgrade"
      echo ""
      echo "Don't forget to read:"
      echo "  https://sympa-community.github.io/manual/upgrade/notes.html"
		fi
	fi
fi

exit 0