File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- # ################### x-ui-pro v6.6.7 @ github.com/GFW4Fun ##############################################
2
+ # ################### x-ui-pro v6.6.8 @ github.com/GFW4Fun ##############################################
3
3
[[ $EUID -ne 0 ]] && echo " not root!" && sudo su -
4
4
# #############################INFO######################################################################
5
5
msg_ok () { echo -e " \e[1;42m $1 \e[0m" ; }
@@ -297,20 +297,22 @@ else
297
297
msg_err " $MainDomain nginx config not exist!" && exit 1
298
298
fi
299
299
300
+ systemctl start nginx
301
+
300
302
if [[ $( nginx -t 2>&1 | grep -o ' successful' ) != " successful" ]]; then
301
303
msg_err " nginx config is not ok!"
302
304
systemctl restart nginx
303
- else
304
- systemctl start nginx
305
- x-ui start > /dev/null 2>&1
306
305
fi
306
+
307
+ x-ui start > /dev/null 2>&1
307
308
# #####################cronjob for ssl/reload service/cloudflareips######################################
308
309
crontab -l | grep -v " certbot\|x-ui\|cloudflareips" | crontab -
309
310
(crontab -l 2> /dev/null; echo ' @daily sudo systemctl restart x-ui nginx tor > /dev/null 2>&1;' ) | crontab -
310
311
(crontab -l 2> /dev/null; echo ' @weekly bash /etc/nginx/cloudflareips.sh > /dev/null 2>&1;' ) | crontab -
311
312
(crontab -l 2> /dev/null; echo ' @monthly certbot renew --nginx --force-renewal --non-interactive --post-hook "nginx -s reload" > /dev/null 2>&1;' ) | crontab -
312
313
# #################################Show Details##########################################################
313
- if systemctl is-active --quiet x-ui; then clear
314
+ if ls /etc/systemd/system/ | grep -q x-ui; then
315
+ clear
314
316
printf ' 0\n' | x-ui | grep --color=never -i ' :'
315
317
msg_inf " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
316
318
nginx -T | grep -i ' ssl_certificate\|ssl_certificate_key'
You can’t perform that action at this time.
0 commit comments