update: 添加自动更新mod脚本

This commit is contained in:
2025-07-24 22:32:57 +08:00
parent 49350bb094
commit a5fea9ccae
4 changed files with 62 additions and 16 deletions

View File

@@ -18,6 +18,7 @@ RUN apt-get update && apt-get install -y \
libtinfo5 \
libvorbisfile3 \
lib32z1 \
cron \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p ${STEAMCMD_DIR}
@@ -38,6 +39,9 @@ RUN chown -R steam:steam ${STEAMCMD_DIR} && \
chown steam:steam /opt/updatemod.sh && \
chown -R steam:steam /opt/games
# 创建crontab配置文件
RUN echo "*/15 * * * * /opt/updatemod.sh >> /var/log/updatemod.log 2>&1" > /etc/cron.d/updatemod
WORKDIR ${STEAMCMD_DIR}
CMD ["/opt/start.sh"]