blob: 0cd2a4f660b8dc362be05a6268747b0780821d19 (
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
27
28
29
30
31
32
33
34
|
post_install() {
systemctl enable pgateway
systemctl start pgateway
echo "To authenticate, run: pertino -u <username> -p <password>"
}
pre_upgrade() {
rm -rf /tmp/pertino-upgrade
mkdir -p /tmp/pertino-upgrade
chmod 700 /tmp/pertino-upgrade
if [ -f /usr/share/pgateway/conf/client.conf ]
then
cp --preserve=all /usr/share/pgateway/conf/client.conf /tmp/pertino-upgrade/client.conf
fi
}
post_upgrade() {
systemctl daemon-reload
systemctl stop pgateway || true
if [ -f /tmp/pertino-upgrade/client.conf ]
then
cp --preserve=all /tmp/pertino-upgrade/client.conf /usr/share/pgateway/conf/client.conf
fi
rm -rf /tmp/pertino-upgrade
systemctl start pgateway
}
pre_remove() {
systemctl stop pgateway
systemctl disable pgateway
rm -f /usr/share/pgateway/.1
rm -f /usr/share/pgateway/tunnel-store.txt
rm -rf /usr/share/pgateway/conf/client.conf
}
|