This commit is contained in:
parent
9bb803abfd
commit
a623b0c1ad
@ -54,8 +54,9 @@ RUN apt-get update \
|
|||||||
then ln -s /usr/lib/aarch64-linux-musl/libc.so /lib/libc.musl-aarch64.so.1; \
|
then ln -s /usr/lib/aarch64-linux-musl/libc.so /lib/libc.musl-aarch64.so.1; \
|
||||||
fi \
|
fi \
|
||||||
&& cp -f /app/nginx.conf /etc/nginx/nginx.template.conf \
|
&& cp -f /app/nginx.conf /etc/nginx/nginx.template.conf \
|
||||||
&& cp /app/update /usr/local/bin/mp_update \
|
&& cp -f /app/update /usr/local/bin/mp_update \
|
||||||
&& chmod +x /app/start /usr/local/bin/mp_update \
|
&& cp -f /app/entrypoint /entrypoint \
|
||||||
|
&& chmod +x /entrypoint /usr/local/bin/mp_update \
|
||||||
&& mkdir -p ${HOME} \
|
&& mkdir -p ${HOME} \
|
||||||
&& groupadd -r moviepilot -g 911 \
|
&& groupadd -r moviepilot -g 911 \
|
||||||
&& useradd -r moviepilot -g moviepilot -d ${HOME} -s /bin/bash -u 911 \
|
&& useradd -r moviepilot -g moviepilot -d ${HOME} -s /bin/bash -u 911 \
|
||||||
@ -80,4 +81,4 @@ RUN apt-get update \
|
|||||||
/var/tmp/*
|
/var/tmp/*
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
VOLUME ["/config"]
|
VOLUME ["/config"]
|
||||||
ENTRYPOINT [ "/app/start" ]
|
ENTRYPOINT [ "/entrypoint" ]
|
||||||
|
20
update
20
update
@ -9,10 +9,14 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
old_version=$(cat /app/version.py)
|
old_version=$(cat /app/version.py)
|
||||||
new_version=$(curl -sL "${GITHUBUSERCONTENT_URL}/jxxghp/MoviePilot/main/version.py")
|
if [[ "${old_version}" == *APP_VERSION* ]]; then
|
||||||
release_version=v$(echo ${new_version} | sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
|
current_version=v$(echo ${old_version} | sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
|
||||||
|
echo "当前版本号:${current_version}"
|
||||||
if [ "${old_version}" != "${new_version}" ]; then
|
new_version=$(curl -sL "${GITHUBUSERCONTENT_URL}/jxxghp/MoviePilot/main/version.py")
|
||||||
|
if [[ "${new_version}" == *APP_VERSION* ]]; then
|
||||||
|
release_version=v$(echo ${new_version} | sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
|
||||||
|
echo "最新版本号:${release_version}"
|
||||||
|
if [ "${old_version}" != "${new_version}" ]; then
|
||||||
echo "发现新版本,开始更新程序..."
|
echo "发现新版本,开始更新程序..."
|
||||||
curl -sL "${GITHUB_URL}/jxxghp/MoviePilot/archive/refs/tags/${release_version}.zip" | busybox unzip -d /tmp -
|
curl -sL "${GITHUB_URL}/jxxghp/MoviePilot/archive/refs/tags/${release_version}.zip" | busybox unzip -d /tmp -
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
@ -31,6 +35,12 @@ if [ "${old_version}" != "${new_version}" ]; then
|
|||||||
else
|
else
|
||||||
echo "后端下载失败,继续使用旧的程序来启动..."
|
echo "后端下载失败,继续使用旧的程序来启动..."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "未发现新版本,跳过更新步骤"
|
echo "未发现新版本,跳过更新步骤"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "最新版本号获取失败,继续使用旧的程序来启动..."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "当前版本号获取失败,继续使用旧的程序来启动..."
|
||||||
fi
|
fi
|
Loading…
x
Reference in New Issue
Block a user