diff --git a/docker/Readme.md b/docker/Readme.md index 43ed853..5075efc 100644 --- a/docker/Readme.md +++ b/docker/Readme.md @@ -6,24 +6,24 @@ ``` docker run -d \ --name IYUUPlus \ --e cron='10 */10 * * *' \ +-e CRON_UPDATE='23 3-23/6 * * *' `# 更新脚本的cron,请务必修改,否则无法更新` \ -v /volume1/IYUU/db:/IYUU/db \ -p 8787:8787 \ --restart=always \ -iyuucn/iyuuplus:arm64v8 +iyuucn/iyuuplus ``` #### 小钢炮方法: ``` docker run -d \ ---name IYUUPlus \ +-e CRON_UPDATE='23 3-23/6 * * *' `# 更新脚本的cron,请务必修改,否则无法更新` \ -e cron='10 */10 * * *' \ -v /volume1/IYUU/db:/IYUU/db \ -v /var/lib/transmission/torrents:/torrents \ -v /var/lib/qbittorrent/.local/share/data/qBittorrent/BT_backup:/BT_backup \ -p 8787:8787 \ --restart always \ -iyuucn/iyuuplus:arm64v8 +iyuucn/iyuuplus ``` #### AMD64平台(MAC OS、台式、服务器、NAS等) @@ -31,11 +31,11 @@ iyuucn/iyuuplus:arm64v8 ``` docker run -d \ --name IYUUPlus \ --e cron='10 */10 * * *' \ +-e CRON_UPDATE='23 3-23/6 * * *' `# 更新脚本的cron,请务必修改,否则无法更新` \ -v /volume1/IYUU/db:/IYUU/db \ -p 8787:8787 \ --restart=always \ -iyuucn/iyuuplus:latest +iyuucn/iyuuplus ``` @@ -79,7 +79,7 @@ docker rm IYUUPlus ### 5.删除镜像 ``` -docker rmi iyuucn/IYUUPlus:arm64v8 +docker rmi iyuucn/IYUUPlus ``` diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 1794c5f..42b2c1d 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,9 +2,11 @@ cd /IYUU -if [[ ! -d /IYUU/.git ]]; then - #git clone https://github.com/ledccn/IYUUPlus.git /IYUU - git clone https://gitee.com/ledc/iyuuplus.git /IYUU +if [[ ! -d /IYUU/.git || ! -f /IYUU/.env ]]; then + #git clone https://github.com/ledccn/IYUUPlus.git /tmp/IYUU + git clone https://gitee.com/ledc/iyuuplus.git /tmp/IYUU + find /tmp/IYUU -mindepth 1 -maxdepth 1 | xargs -I {} cp -r {} /IYUU + rm -rf /tmp/IYUU else git fetch --all git reset --hard origin/master