summarylogtreecommitdiffstats
path: root/.INSTALL
blob: caf3c40631c53151362a225517b2b37fa4312e5b (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
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'`

	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 5.0.0            |\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'`

	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 5.0.0            |\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: