Skip to content

Commit 78811ad

Browse files
authored
Update x-ui-pro.sh
1 parent 3bbd61b commit 78811ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-ui-pro.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
#################### x-ui-pro v12.0.3 @ github.com/GFW4Fun ##############################################
2+
#################### x-ui-pro v12.0.4 @ github.com/GFW4Fun ##############################################
33
[[ $EUID -ne 0 ]] && { echo "not root!"; exec sudo "$0" "$@"; }
44
msg() { echo -e "\e[1;37;40m $1 \e[0m";}
55
msg_ok() { echo -e "\e[1;32;40m $1 \e[0m";}
@@ -462,6 +462,7 @@ tasks=(
462462
"0 0 1 * * sudo su -c 'certbot renew --nginx --force-renewal --non-interactive --post-hook \"nginx -s reload\"' >> /var/log/certbot_renew.log 2>&1"
463463
"* * * * * sudo su -c '[[ \"\$(curl -s --socks5-hostname 127.0.0.1:8086 checkip.amazonaws.com)\" =~ ^((([0-9]{1,3}\.){3}[0-9]{1,3})|(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}))\$ ]] || systemctl restart warp-plus'"
464464
"0 0 * * 0 sudo bash /etc/nginx/cloudflareips.sh > /dev/null 2>&1"
465+
"0 2 * * * mkdir -p /var/backups && cp /etc/x-ui/x-ui.db /var/backups/x-ui.db.$(date +\%F-\%H-\%M-\%S) && find /var/backups -name \"x-ui.db.*\" -mtime +7 -delete"
465466
)
466467
crontab -l | grep -qE "x-ui" || { printf "%s\n" "${tasks[@]}" | crontab -; }
467468
##################################Show Details##########################################################

0 commit comments

Comments
 (0)