forked from StrawDC/OpenVPN-server
-
Notifications
You must be signed in to change notification settings - Fork 2
/
fas.bin
1508 lines (1423 loc) · 50.6 KB
/
fas.bin
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
function fhqcz() {
#关闭SELinux
setenforce 0 >/dev/null 2>&1
if [ ! -f /etc/selinux/config ]; then
echo "警告!SELinux关闭失败,请自行检查SELinux关键模块是否存在!脚本停止!"
exit
fi
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
iptables -F
service iptables save >/dev/null 2>&1
systemctl restart iptables.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!IPtables重启失败!请手动重启IPtables查看失败原因!脚本停止!"
exit
fi
iptables -A INPUT -s 127.0.0.1/32 -j ACCEPT
iptables -A INPUT -d 127.0.0.1/32 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport $Apacheport -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 440 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 3389 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 137 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 137 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 1194 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 1195 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 1196 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 1197 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 137 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 138 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 53 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A PREROUTING -p udp --dport 138 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 137 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 1194 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 1195 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 1196 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 1197 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING --dst 10.8.0.1 -p udp --dport 53 -j DNAT --to-destination 10.8.0.1:5353
iptables -t nat -A PREROUTING --dst 10.9.0.1 -p udp --dport 53 -j DNAT --to-destination 10.9.0.1:5353
iptables -t nat -A PREROUTING --dst 10.10.0.1 -p udp --dport 53 -j DNAT --to-destination 10.10.0.1:5353
iptables -t nat -A PREROUTING --dst 10.11.0.1 -p udp --dport 53 -j DNAT --to-destination 10.11.0.1:5353
iptables -t nat -A PREROUTING --dst 10.12.0.1 -p udp --dport 53 -j DNAT --to-destination 10.12.0.1:5353
iptables -A INPUT -p udp -m udp --dport 5353 -j ACCEPT
iptables -P INPUT DROP
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -j MASQUERADE
service iptables save >/dev/null 2>&1
systemctl restart iptables.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!IPtables重启失败!请手动重启IPtables查看失败原因!脚本停止!"
exit
fi
echo
echo "防火墙已重置完成!"
}
function juli01() {
#关闭SELinux
setenforce 0 >/dev/null 2>&1
if [ ! -f /etc/selinux/config ]; then
#echo "SELinux检测不到的,关闭不掉的,或关闭失败的,请自行联系破解作者解决!"
echo "警告!SELinux关闭失败,请自行检查SELinux关键模块是否存在!脚本停止!"
exit
fi
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
#下载IP路由转发配置
rm -rf /etc/sysctl.conf
wget -q ${downloadhost}sysctl.conf -P /etc
if [ ! -f /etc/sysctl.conf ]; then
echo "警告!IP路由转发配置文件下载失败,请自行检查下载源是否可用!脚本停止!"
exit
fi
sysctl -p /etc/sysctl.conf >/dev/null 2>&1
#停止firewalld防火墙
systemctl stop firewalld.service >/dev/null 2>&1
#禁用firewalld防火墙
systemctl disable firewalld.service >/dev/null 2>&1
#尝试停止iptables防火墙
systemctl stop iptables.service >/dev/null 2>&1
#安装iptables防火墙
yum -y install iptables iptables-services >/dev/null 2>&1
#启动iptables防火墙
systemctl start iptables.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!IPtables启动失败!请手动重启IPtables查看失败原因!脚本停止!"
exit
fi
#清空iptables防火墙配置
iptables -F
service iptables save >/dev/null 2>&1
systemctl restart iptables.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!IPtables重启失败!请手动重启IPtables查看失败原因!脚本停止!"
exit
fi
iptables -A INPUT -s 127.0.0.1/32 -j ACCEPT
iptables -A INPUT -d 127.0.0.1/32 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport $juliApacheport -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 440 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 3389 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 1194 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 1195 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 1196 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 1197 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 138 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 137 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 137 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 138 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 53 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 5353 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A PREROUTING -p udp --dport 138 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 137 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 1194 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 1195 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 1196 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p udp --dport 1197 -j REDIRECT --to-ports 53
#iptables -t nat -I PREROUTING -p udp --dport 5353 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING --dst 10.8.0.1 -p udp --dport 53 -j DNAT --to-destination 10.8.0.1:5353
iptables -t nat -A PREROUTING --dst 10.9.0.1 -p udp --dport 53 -j DNAT --to-destination 10.9.0.1:5353
iptables -t nat -A PREROUTING --dst 10.10.0.1 -p udp --dport 53 -j DNAT --to-destination 10.10.0.1:5353
iptables -t nat -A PREROUTING --dst 10.11.0.1 -p udp --dport 53 -j DNAT --to-destination 10.11.0.1:5353
iptables -t nat -A PREROUTING --dst 10.12.0.1 -p udp --dport 53 -j DNAT --to-destination 10.12.0.1:5353
iptables -A INPUT -p udp -m udp --dport 5353 -j ACCEPT
iptables -P INPUT DROP
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.9.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.10.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.11.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.12.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -j MASQUERADE
service iptables save >/dev/null 2>&1
systemctl restart iptables.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!IPtables重启失败!请手动重启IPtables查看失败原因!脚本停止!"
exit;0
fi
systemctl enable iptables.service >/dev/null 2>&1
}
function juli02() {
#--force --nodeps
#安装epel仓库
yum -y install epel-release
#yum -y install openssl openssl-libs openssl-devel lzo lzo-devel pam pam-devel automake pkgconfig gawk tar zip unzip net-tools psmisc gcc httpd libxml2 libxml2-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel dnsmasq iptables iptables-services
#安装筑梦官方所需环境
yum -y install telnet avahi openssl openssl-libs openssl-devel lzo lzo-devel pam pam-devel automake pkgconfig gawk tar zip unzip net-tools psmisc gcc pkcs11-helper mariadb mariadb-server httpd libxml2 libxml2-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel dnsmasq jre-1.7.0-openjdk crontabs
#安装PHP环境(这里使用的是第三方PHP安装源,并非筑梦官方安装源,此项并不影响正常安装使用使用)
#安装PHP7.0
rpm -Uvh ${downloadhost}webtatic-release.rpm
yum install php70w php70w-fpm php70w-bcmath php70w-cli php70w-common php70w-dba php70w-devel php70w-embedded php70w-enchant php70w-gd php70w-imap php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysqlnd php70w-odbc php70w-opcache php70w-pdo php70w-pdo_dblib php70w-pear.noarch php70w-pecl-apcu php70w-pecl-apcu-devel php70w-pecl-imagick php70w-pecl-imagick-devel php70w-pecl-mongodb php70w-pecl-redis php70w-pecl-xdebug php70w-pgsql php70w-xml php70w-xmlrpc php70w-intl php70w-mcrypt --nogpgcheck php-fedora-autoloader php-php-gettext php-tcpdf php-tcpdf-dejavu-sans-fonts php70w-tidy -y
#安装openvpn.rpm所需环境!
rpm -Uvh ${downloadhost}liblz4-1.8.1.2-alt1.x86_64.rpm
#这里使用的是非筑梦官方的openvpn源,由于筑梦官方的openvpn2.4.3的rpm包找不到,只能采用最新版的2.4.6的rpm包
rpm -Uvh ${downloadhost}openvpn-2.4.6-1.el7.x86_64.rpm
}
function juli03() {
systemctl start mariadb.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!MariaDB初始化失败!请手动启动MariaDB查看失败原因!脚本停止!"
exit;0
fi
mysqladmin -uroot password "$julisqlpass" #创建数据库密码
mysql -uroot -p$julisqlpass -e "create database vpndata;" #创建vpndata数据表
#mysql -uroot -p$julisqlpass -e "drop database test;" #删除默认test数据库
#mysql -uroot -p$julisqlpass -e "CREATE USER 'vpndata'@'localhost';SET PASSWORD FOR 'vpndata'@'localhost' = PASSWORD('dnfbjbvad16816461sd');GRANT All ON *.* TO 'vpndata'@'localhost';"
systemctl restart mariadb.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!MariaDB重启失败!请手动重启MariaDB查看失败原因!脚本停止!"
exit;0
fi
systemctl enable mariadb.service >/dev/null 2>&1
}
function juli04() {
#修改Apache端口 修改主机名
sed -i "s/#ServerName www.example.com:80/ServerName localhost:$juliApacheport/g" /etc/httpd/conf/httpd.conf
sed -i "s/Listen 80/Listen $juliApacheport/g" /etc/httpd/conf/httpd.conf
setenforce 0 >/dev/null 2>&1
systemctl start httpd.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!Apache启动失败!请手动启动Apache查看失败原因!脚本停止!"
exit;0
fi
systemctl enable httpd.service >/dev/null 2>&1
#由于PHP问题,需要添加第三方数据库支持,请勿删除,否则phpMyAdmin无法打开!
cat >> /etc/php.ini <<EOF
extension=php_mcrypt.dll
extension=php_mysqli.dll
EOF
systemctl start php-fpm.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!PHP启动失败!请手动启动PHP查看失败原因!脚本停止!"
exit;0
fi
systemctl enable php-fpm.service >/dev/null 2>&1
}
function juli05() {
if [ ! -d /etc/openvpn ]; then
echo "警告!OpenVPN安装失败,请自行检查rpm包下载源是否可用!脚本停止!"
exit;0
fi
cd /etc/openvpn && rm -rf /etc/openvpn/*
wget -q ${downloadhost}openvpn.zip
if [ ! -f /etc/openvpn/openvpn.zip ]; then
echo "警告!OpenVPN配置文件下载失败,请自行检查下载源是否可用!脚本停止!"
exit;0
fi
unzip -o openvpn.zip >/dev/null 2>&1
rm -rf openvpn.zip && chmod 0777 -R /etc/openvpn
sed -i "s/newpass/"$julisqlpass"/g" /etc/openvpn/auth_config.conf
sed -i "s/服务器IP/"$IP"/g" /etc/openvpn/auth_config.conf
systemctl enable openvpn@server1194.service >/dev/null 2>&1
systemctl enable openvpn@server1195.service >/dev/null 2>&1
systemctl enable openvpn@server1196.service >/dev/null 2>&1
systemctl enable openvpn@server1197.service >/dev/null 2>&1
systemctl enable openvpn@server-udp.service >/dev/null 2>&1
}
function juli06() {
if [ ! -f /etc/dnsmasq.conf ]; then
echo "警告!dnsmasq安装失败,请自行检查dnsmasq是否安装正确!脚本停止!"
exit;0
fi
rm -rf /etc/dnsmasq.conf
wget -q ${downloadhost}dnsmasq.conf -P /etc && chmod 0777 /etc/dnsmasq.conf
if [ ! -f /etc/dnsmasq.conf ]; then
echo "警告!dnsmasq配置文件下载失败,请自行检查下载源是否可用!脚本停止!"
exit;0
fi
systemctl enable dnsmasq.service >/dev/null 2>&1
}
function juli07() {
###安装数据库自动备份
systemctl start crond.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!Crond启动失败!请手动启动Crond查看失败原因!脚本停止!"
exit;0
fi
crontab -l > /tmp/crontab.$$
echo '*/60 * * * * /etc/openvpn/sqlbackup' >> /tmp/crontab.$$
crontab /tmp/crontab.$$
systemctl restart crond.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!Crond重启失败!请手动启动Crond查看失败原因!脚本停止!"
exit;0
fi
systemctl enable crond.service >/dev/null 2>&1
}
function web() {
#安装web云端
rm -rf /var/www/* && cd /var/www && wget -q ${downloadhost}fas_web.zip
if [ ! -f /var/www/fas_web.zip ]; then
echo "警告!FAS-WEB配置文件下载失败,请自行检查下载源是否可用!脚本停止!"
exit;0
fi
unzip -o fas_web.zip >/dev/null 2>&1 && rm -rf fas_web.zip && chmod 0777 -R /var/www/html
#导入数据库vpndata表数据
sed -i "s/julifasadmin/"$juliadminuser"/g" /var/www/vpndata.sql
sed -i "s/julifaspass/"$juliadminpass"/g" /var/www/vpndata.sql
sed -i "s/服务器IP/"$IP"/g" /var/www/vpndata.sql
mysql -uroot -p$julisqlpass vpndata < /var/www/vpndata.sql
rm -rf /var/www/vpndata.sql
#修改数据库密码
sed -i "s/newpass/"$julisqlpass"/g" /var/www/html/config.php
#添加本地随机密钥
echo "$juliadminbendipass">>/var/www/auth_key.access
}
function sbin() {
#新建带宽监控数据文件夹
mkdir /etc/rate.d/ && chmod -R 0777 /etc/rate.d/
#更新命令指示符
cd /root&&wget -q ${downloadhost}res.zip
if [ ! -f /root/res.zip ]; then
echo "警告!FAS-res配置文件下载失败,请自行检查下载源是否可用!脚本停止!"
exit;0
fi
unzip -o res.zip >/dev/null 2>&1 && chmod -R 0777 /root && rm -rf /root/res.zip
mv /root/res/fas.service /lib/systemd/system/fas.service && chmod -R 0777 /lib/systemd/system/fas.service && systemctl enable fas.service >/dev/null 2>&1
cd /bin && wget -q ${downloadhost}bin.zip
if [ ! -f /bin/bin.zip ]; then
echo "警告!FAS命令指示符配置文件下载失败,请自行检查下载源是否可用!脚本停止!"
exit;0
fi
unzip -o bin.zip >/dev/null 2>&1 && rm -rf /bin/bin.zip && chmod -R 0777 /bin
#新建自定义屏蔽host文件
echo 'FAS系统自定义屏蔽host文件
'>>/etc/fas_host && chmod 0777 /etc/fas_host
}
function qidongya() {
#启动所有服务
systemctl restart iptables.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!IPtables重启失败!请手动重启IPtables查看失败原因!脚本停止!"
exit;0
fi
systemctl restart mariadb.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!MariaDB重启失败!请手动重启MariaDB查看失败原因!脚本停止!"
exit;0
fi
systemctl restart httpd.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!Apache启动失败!请手动启动Apache查看失败原因!脚本停止!"
exit;0
fi
systemctl restart php-fpm.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!PHP启动失败!请手动启动PHP查看失败原因!脚本停止!"
exit;0
fi
systemctl restart dnsmasq.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!DNSmasq启动失败!请手动启动DNSmasq查看失败原因!脚本停止!"
exit;0
fi
systemctl restart openvpn@server1194.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!openvpn@server1194服务启动失败!请手动启动openvpn@server1194服务查看失败原因!脚本停止!"
exit;0
fi
systemctl restart openvpn@server1195.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!openvpn@server1195服务启动失败!请手动启动openvpn@server1195服务查看失败原因!脚本停止!"
exit;0
fi
systemctl restart openvpn@server1196.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!openvpn@server1196服务启动失败!请手动启动openvpn@server1196服务查看失败原因!脚本停止!"
exit;0
fi
systemctl restart openvpn@server1197.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!openvpn@server1197服务启动失败!请手动启动openvpn@server1197服务查看失败原因!脚本停止!"
exit;0
fi
systemctl restart openvpn@server-udp.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!openvpn@server-udp服务启动失败!请手动启动openvpn@server-udp服务查看失败原因!脚本停止!"
exit;0
fi
systemctl restart fas.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!Fas服务启动失败!请手动启动Fas服务查看失败原因!脚本停止!"
exit;0
fi
systemctl restart crond.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!Crond重启失败!请手动启动Crond查看失败原因!脚本停止!"
exit;0
fi
dhclient >/dev/null 2>&1
vpn restart >/dev/null 2>&1
}
function Installation() {
#安装单独APP制作环境
yum install jre-1.7.0-openjdk unzip zip wget curl -y >/dev/null 2>&1
}
function app1() {
rm -rf /APP
mkdir /APP >/dev/null 2>&1
cd /APP
wget -q ${downloadhost}fas.apk&&wget -q ${downloadhost}apktool.jar&&java -jar apktool.jar d fas.apk >/dev/null 2>&1&&rm -rf fas.apk
sed -i 's/demo.dingd.cn:80/'${llwsIP}:${juliApacheport}'/g' `grep demo.dingd.cn:80 -rl /APP/fas/smali/net/openvpn/openvpn/`
sed -i 's/叮咚流量卫士/'${llwsname}'/g' "/APP/fas/res/values/strings.xml"
sed -i 's/net.dingd.vpn/'${llwsbaoming}'/g' "/APP/fas/AndroidManifest.xml"
java -jar apktool.jar b fas >/dev/null 2>&1
wget -q ${downloadhost}signer.zip&&unzip -o signer.zip >/dev/null 2>&1
mv /APP/fas/dist/fas.apk /APP/fas.apk
java -jar signapk.jar testkey.x509.pem testkey.pk8 /APP/fas.apk /APP/fas_sign.apk >/dev/null 2>&1
cp -rf /APP/fas_sign.apk /root/fasapp_by_hyx.apk
rm -rf /APP
if [ ! -f /root/fasapp_by_hyx.apk ]; then
echo
echo "筑梦FAS系统APP制作失败!"
echo
echo "请自行前往大佬装逼交流群获取手动对接APP源!"
echo
echo "大佬装逼交流群:541349340 欢迎你的加入!"
exit;0
fi
}
function app() {
#制作APP
rm -rf /APP
mkdir /APP >/dev/null 2>&1
cd /APP
wget -q ${downloadhost}fas.apk&&wget -q ${downloadhost}apktool.jar&&java -jar apktool.jar d fas.apk >/dev/null 2>&1&&rm -rf fas.apk
sed -i 's/demo.dingd.cn:80/'${llwsIP}:${juliApacheport}'/g' `grep demo.dingd.cn:80 -rl /APP/fas/smali/net/openvpn/openvpn/`
sed -i 's/叮咚流量卫士/'${llwsname}'/g' "/APP/fas/res/values/strings.xml"
sed -i 's/net.dingd.vpn/'${llwsbaoming}'/g' "/APP/fas/AndroidManifest.xml"
java -jar apktool.jar b fas >/dev/null 2>&1
wget -q ${downloadhost}signer.zip&&unzip -o signer.zip >/dev/null 2>&1
mv /APP/fas/dist/fas.apk /APP/fas.apk
java -jar signapk.jar testkey.x509.pem testkey.pk8 /APP/fas.apk /APP/fas_sign.apk >/dev/null 2>&1
cp -rf /APP/fas_sign.apk /var/www/html/fasapp_by_hyx.apk
rm -rf /APP
if [ ! -f /var/www/html/fasapp_by_hyx.apk ]; then
echo
echo "筑梦FAS系统APP制作失败!"
echo
echo "请自行前往大佬装逼交流群获取手动对接APP源!"
echo
echo "大佬装逼交流群:541349340 欢迎你的加入!"
fi
}
function zhuji() {
clear
echo
read -p "请输入本机数据库地址(localhost): " julisqlip
if [ -z "$julisqlip" ];then
julisqlip=localhost
fi
echo
read -p "请输入本机数据库端口(3306): " julisqlport
if [ -z "$julisqlport" ];then
julisqlport=3306
fi
echo
read -p "请输入本机数据库账号(root): " julisqluser
if [ -z "$julisqluser" ];then
julisqluser=root
fi
echo
read -p "请输入本机数据库密码: " julisqlpass
if [ -z "$julisqlpass" ];then
julisqlpass=
fi
echo
echo "正在为您的系统进行负载,请稍等......"
sleep 3
SQL_RESULT=`mysql -h${julisqlip} -P${julisqlport} -u${julisqluser} -p${julisqlpass} -e quit 2>&1`;
SQL_RESULT_LEN=${#SQL_RESULT};
if [[ !${SQL_RESULT_LEN} -eq 0 ]];then
echo
echo "数据库连接失败,请检查您的数据库密码后重试,脚本停止!";
exit;
fi
iptables -A INPUT -p tcp -m tcp --dport $julisqlport -j ACCEPT
service iptables save >/dev/null 2>&1
systemctl restart iptables.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!IPtables重启失败!请手动重启IPtables查看失败原因!脚本停止!"
exit
fi
mysql -h${julisqlip} -P${julisqlport} -u${julisqluser} -p${julisqlpass} <<EOF
grant all privileges on *.* to '${julisqluser}'@'%' identified by '${julisqlpass}' with grant option;
flush privileges;
EOF
systemctl restart mariadb.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!MariaDB重启失败!请手动重启MariaDB查看失败原因!脚本停止!"
exit
fi
sleep 5
echo
echo "已成功为您的系统进行负载!您可以在任何搭载FAS系统机器上对接至本服务器!"
}
function port123() {
clear
echo -e "请选择协议类型(本程序仅适用于FAS系统):"
echo -e "1. TCP 代理端口"
echo -e "2. UDP 直连端口(将转发至53端口)"
read install_type
echo -n "请输入端口号(0-65535):"
read port
if [ $install_type == 1 ];then
/root/res/proxy.bin -l $port -d
read has < <(cat /etc/sysconfig/iptables | grep "tcp \-\-dport $port \-j ACCEPT" )
if [ -z "$has" ];then
iptables -A INPUT -p tcp -m tcp --dport $port -j ACCEPT
service iptables save
echo -e "[添加tcp $port 至防火墙白名单]"
fi
read has2 < <(cat /root/res/portlist.conf | grep "port $port tcp" )
if [ -z "$has2" ];then
echo -e "port $port tcp">>/root/res/portlist.conf
fi
echo -e "[已经成功添加代理端口]"
else
read has < <(cat /etc/sysconfig/iptables | grep "udp \-\-dport $port \-j ACCEPT" )
if [ -z "$has" ];then
iptables -A INPUT -p udp -m udp --dport $port -j ACCEPT
service iptables save
echo -e "[添加tcp $port 至防火墙白名单]"
fi
iptables -t nat -A PREROUTING -p udp --dport $port -j REDIRECT --to-ports 53 && service iptables save
echo -e "[已将此端口转发至53 UDP端口]"
fi
echo "感谢使用 再见!"
exit;0
}
function fuji() {
clear
echo
read -p "请输入本机IP: " julibenjiip
if [ -z "$julibenjiip" ];then
julibenjiip=
fi
echo
read -p "请输入主机IP: " julisqlip
if [ -z "$julisqlip" ];then
julisqlip=
fi
echo
read -p "请输入主机数据库端口: " julisqlport
if [ -z "$julisqlport" ];then
julisqlport=
fi
echo
read -p "请输入主机数据库账号: " julisqluser
if [ -z "$julisqluser" ];then
julisqluser=
fi
echo
read -p "请输入主机数据库密码: " julisqlpass
if [ -z "$julisqlpass" ];then
julisqlpass=
fi
echo
echo "正在为您的系统进行负载,请稍等......"
sleep 3
SQL_RESULT=`mysql -h${julisqlip} -P${julisqlport} -u${julisqluser} -p${julisqlpass} -e quit 2>&1`;
SQL_RESULT_LEN=${#SQL_RESULT};
if [[ !${SQL_RESULT_LEN} -eq 0 ]];then
echo
echo "连接至主机数据库失败,请检查您的主机数据库密码后重试,脚本停止!";
exit;
fi
rm -rf /etc/openvpn/auth_config.conf
echo '#!/bin/bash
#兼容配置文件 此文件格式既可以适应shell也可以适应FasAUTH,但是这里不能使用变量,也不是真的SHELL文件,不要写任何shell在这个文件
#FAS监控系统配置文件
#请谨慎修改
#数据库地址
mysql_host='$julisqlip'
#数据库用户
mysql_user='$julisqluser'
#数据库密码
mysql_pass='$julisqlpass'
#数据库端口
mysql_port='$julisqlport'
#数据库表名
mysql_data=vpndata
#本机地址
address='$julibenjiip'
#指定异常记录回收时间 单位s 600即为十分钟
unset_time=600
#删除僵尸记录地址
del="/root/res/del"
#进程1监控地址
status_file_1="/var/www/html/openvpn_api/online_1194.txt 7075 1194 tcp-server"
status_file_2="/var/www/html/openvpn_api/online_1195.txt 7076 1195 tcp-server"
status_file_3="/var/www/html/openvpn_api/online_1196.txt 7077 1196 tcp-server"
status_file_4="/var/www/html/openvpn_api/online_1197.txt 7078 1197 tcp-server"
status_file_5="/var/www/html/openvpn_api/user-status-udp.txt 7079 53 udp"
#睡眠时间
sleep=3'>/etc/openvpn/auth_config.conf && chmod -R 0777 /etc/openvpn/auth_config.conf
rm -rf /var/www/html/config.php
echo '<?php
/* 本文件由系统自动生成 如非必要 请勿修改 */
define("_host_","'$julisqlip'");
define("_user_","'$julisqluser'");
define("_pass_","'$julisqlpass'");
define("_port_","'$julisqlport'");
define("_ov_","vpndata");
define("_openvpn_","openvpn");
define("_iuser_","iuser");
define("_ipass_","pass");
define("_isent_","isent");
define("_irecv_","irecv");
define("_starttime_","starttime");
define("_endtime_","endtime");
define("_maxll_","maxll");
define("_other_","dlid,tian");
define("_i_","i");'>/var/www/html/config.php && chmod -R 0777 /var/www/html/config.php
systemctl stop mariadb.service >/dev/null 2>&1
if [[ $? -eq 0 ]];then
echo "" >/dev/null 2>&1
else
echo "警告!MariaDB停止失败!请手动停止MariaDB查看失败原因!脚本停止!"
exit;0
fi
sleep 5
echo
echo "已成功为您的系统进行负载!主机IP为:"$julisqlip"!"
echo
echo "副机系统请前往shell控制台输入 unfas、unsql 关闭后台登录权限,以防被不法份子入侵系统!"
echo
echo "请您及时前往主机FAS后台管理添加本机,本机IP: "$julibenjiip""
}
function menufuzai() {
clear
echo
echo -e "************************************************"
echo -e " 欢迎使用FAS系统快速负载助手 "
echo -e "************************************************"
echo -e "请选择:"
echo
echo -e "\033[36m 1、主机开启远程连接权限\033[0m \033[31m(主机只需开启一次,后续直接副机对接主机即可)\033[0m"
echo
echo -e "\033[36m 2、副机连接主机数据库\033[0m \033[31m(在副机执行,每个机子无限负载主机,仅生效最后一次负载的机器)\033[0m"
echo
echo -e "\033[36m 3、退出脚本!\033[0m"
echo
echo
read -p " 请输入安装选项并回车: " a
echo
echo
k=$a
if [[ $k == 1 ]];then
downloadhostxuanzhe
zhuji
exit;0
fi
if [[ $k == 2 ]];then
downloadhostxuanzhe
fuji
exit;0
fi
if [[ $k == 3 ]];then
echo
echo "感谢您的使用,再见!"
exit;0
fi
echo -e "\033[31m 输入错误!请重新运行脚本!\033[0m "
exit;0
}
function done1() {
#完成安装
#锁定数据库后台
unsql >/dev/null 2>&1
clear
echo "---------------------------------------------"
echo "---------------------------------------------"
echo "恭喜,您已经安装完毕。"
echo "控制台: http://"$IP":"$juliApacheport"/admin/"
echo "账号: "$juliadminuser" 密码: "$juliadminpass""
echo "控制台随机本地密钥: "$juliadminbendipass""
echo "内置数据库管理: http://"$IP":"$juliApacheport"/phpMyAdmin/"
echo "---------------------------------------------"
echo "数据库账户: root 密码: "$julisqlpass" "
echo "代理控制台: http://"$IP":"$juliApacheport"/daili"
echo "---------------------------------------------"
echo "常用指令: "
echo "重启VPN vpn restart FAS后台开启:onfas "
echo "启动VPN vpn start FAS后台关闭:unfas "
echo "停止VPN vpn stop 数据库开启:onsql "
echo "开任意端口 port 数据库关闭:unsql "
echo "---------------------------------------------"
echo "数据库60分钟自动备份,备份目录在/root/backup/"
echo "数据库手动备份命令:backup "
echo "APP下载地址: http://"$IP":"$juliApacheport"/fasapp_by_hyx.apk"
echo "FAS破解作者: 何以潇 QQ:"$qqhao" "
echo "大佬装逼交流群:541349340 欢迎你的加入! "
echo "---------------------------------------------"
echo "---------------------------------------------"
exit;0
}
function infoapp() {
clear
echo
read -p "请设置APP名称(默认:流量卫士): " llwsname
if [ -z "$llwsname" ];then
llwsname=流量卫士
fi
echo -e "已设置APP名称为:\033[32m "$llwsname"\033[0m"
echo
read -p "请设置APP解析地址(可输入域名或IP,不带http://): " llwsIP
if [ -z "$llwsIP" ];then
llwsIP=`curl -s http://members.3322.org/dyndns/getip`;
fi
echo -e "已设置APP解析地址为:\033[32m "$llwsIP"\033[0m"
echo
read -p "请设置APP端口(默认:1024): " juliApacheport
if [ -z "$juliApacheport" ];then
juliApacheport=1024
fi
echo -e "已设置APP端口为:\033[32m "$juliApacheport"\033[0m"
echo
read -p "请设置APP包名(默认:net.dingd.vpn): " llwsbaoming
if [ -z "$llwsbaoming" ];then
llwsbaoming=net.dingd.vpn
fi
echo -e "已设置APP包名为:\033[32m "$llwsbaoming"\033[0m"
echo
sleep 2
echo "请稍等...."
echo
sleep 3
downloadhostxuanzhe
sleep 2
clear
sleep 2
echo -e "\033[1;32m制作开始...\033[0m"
sleep 5
}
function fashoutaijiance() {
if [ $juliApacheport == 80 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为80,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 22 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为22,与SSH登录端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 21 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为21,与SFTP登录端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 25 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为25,与邮件发送端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 8080 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为8080,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 1194 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为1194,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 28080 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为28080,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 65080 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为65080,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 136 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为136,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 137 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为137,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 138 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为138,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 139 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为139,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 53 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为53,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 68 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为68与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 1195 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为1195,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 1196 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为1196,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 1197 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为1197,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 8081 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为8081,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 443 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为443,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 440 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为440,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 5353 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为5353,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 3389 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为3389,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 7505 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为7505,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 7506 ];then
juliApacheport=1024
echo -e "系统检测到您输入的Apache端口为7506,与OpenVPN免流端口冲突,系统已默认修改您的Apache端口为: \033[32m"$juliApacheport"\033[0m";
echo
sleep 3
else
echo "" >/dev/null 2>&1
fi
if [ $juliApacheport == 7507 ];then
juliApacheport=1024