Some checks failed
Weekly Translation Workflow / translate (push) Has been cancelled
- Replace 'docker run -p 80:80' with '--network host' for certbot standalone HTTP-01 to avoid timeout in environments where Docker NAT port-publish breaks LE inbound traffic but host port 80 is reachable. - Applies to kejilion.sh (all locale variants) and auto_cert_renewal.sh. - README install command points to this Gitea mirror.
11 lines
413 B
Bash
11 lines
413 B
Bash
#!/bin/bash
|
|
|
|
# Create a tar archive of the web directory
|
|
cd /home/ && tar czvf web_$(date +"%Y%m%d%H%M%S").tar.gz web
|
|
|
|
# Transfer the tar archive to another VPS
|
|
cd /home/ && ls -t /home/*.tar.gz | head -1 | xargs -I {} sshpass -p 123456 scp -o StrictHostKeyChecking=no -P 22 {} root@0.0.0.0:/home/
|
|
|
|
# Keep only 5 tar archives and delete the rest
|
|
cd /home/ && ls -t /home/*.tar.gz | tail -n +4 | xargs -I {} rm {}
|