blob: 8ed1e1583b428fb760afed0b47ac221bf10c234c (
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
35
36
37
38
39
40
41
42
43
44
45
46
|
post_install() {
systemctl daemon-reload
systemctl start phtunnel.service
snbuf=$(wget 127.0.0.1:16062/ora_service/getsn -T 3 -q -O - 2>/dev/null)
SN=`echo -e $snbuf | grep -oE '"device_sn":"[^\"]+' | cut -d ":" -f 2 | sed 's/\"//g'`
pkgver=${1%-*}
echo -e "\033[1;31mSuccessful installation of Phddns Service.\033[0m"
sleep 2
if [ `systemctl is-active phtunnel.service` == 'active' ]; then
echo -e ""
echo -e " \033[32m+--------------------------------------------------+\033[0m"
echo -e " \033[32m| Oray Phtunnel Linux $pkgver |\033[0m"
echo -e " \033[32m+--------------------------------------------------+\033[0m"
echo -e " \033[32m| SN: $SN Default password: admin |\033[0m"
echo -e " \033[32m+--------------------------------------------------+\033[0m"
echo -e " \033[32m| Remote Management Address http://b.oray.com |\033[0m"
echo -e " \033[32m+--------------------------------------------------+\033[0m"
fi
}
post_upgrade() {
systemctl daemon-reload
systemctl start phtunnel.service
snbuf=$(wget 127.0.0.1:16062/ora_service/getsn -T 3 -q -O - 2>/dev/null)
SN=`echo -e $snbuf | grep -oE '"device_sn":"[^\"]+' | cut -d ":" -f 2 | sed 's/\"//g'`
pkgver=${1%-*}
echo -e "\033[1;31mSuccessful installation of Phddns Service.\033[0m"
sleep 2
if [ `systemctl is-active phtunnel.service` == 'active' ]; then
echo -e ""
echo -e " \033[32m+--------------------------------------------------+\033[0m"
echo -e " \033[32m| Oray Phtunnel Linux $pkgver |\033[0m"
echo -e " \033[32m+--------------------------------------------------+\033[0m"
echo -e " \033[32m| SN: $SN Default password: admin |\033[0m"
echo -e " \033[32m+--------------------------------------------------+\033[0m"
echo -e " \033[32m| Remote Management Address http://b.oray.com |\033[0m"
echo -e " \033[32m+--------------------------------------------------+\033[0m"
fi
}
# vim : set sw=2 ts=2 et:
|