blob: 7ad7de9bdea66930519a190660d461a8962a6b49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
pre_upgrade() {
local new=$1 old=$2
# On upgrade from <= 1.2.x to >= 1.3.x, automatically migrate the configs
if [ `vercmp $old 1.3.0` -lt 0 ] && [ `vercmp $new 1.3.0` -ge 0 ]; then
if [ -f etc/tlshd.conf ] && [ ! -f etc/tlshd/config ]; then
echo "Migrating /etc/tlshd.conf to the new location"
mkdir -vp etc/tlshd
cp -avb etc/tlshd.conf etc/tlshd/config
# The new template config will get installed as config.pacnew
fi
fi
}
post_upgrade() {
local new=$1 old=$2
}
|