diff --git a/alist/README.md b/alist/README.md index 3afa6ef..49e978e 100644 --- a/alist/README.md +++ b/alist/README.md @@ -16,6 +16,12 @@ docker run -d -p 5678:80 -p 2345:2345 -p 2346:2346 --restart=unless-stopped --na `ALIYUN_FOLDER_ID`: 阿里云小雅文件夹id,转存以下文件到你的云盘,获取文件夹id,共享链接:https://www.aliyundrive.com/s/rP9gP3h9asE +`PIKPAK_LIST`: pikpak 账号列表,格式:`qqq@qq.com:aaadds,+8613111111111:dasf`,密码中不支持符号,: + +`FORCE_LOGIN`: 开启登陆功能,true/false + +`WEBDAV_PASSWORD`: webdav用户名为dav,设置密码,默认密码:guest_Api789 + `AUTO_UPDATE_ENABLED`: 自动更新小雅的文件,true/false `AUTO_CLEAR_ENABLED`: 自动清理阿里云云盘的文件,true/false \ No newline at end of file diff --git a/alist/start.sh b/alist/start.sh index d6ca158..2affc1b 100644 --- a/alist/start.sh +++ b/alist/start.sh @@ -38,6 +38,36 @@ else echo "${ALIYUN_FOLDER_ID}" > /data/temp_transfer_folder_id.txt fi +# 设置pikpak用户 +if [ -n "${PIKPAK_LIST:-}" ]; then + echo "设置PIKPAK用户密码..." + rm -rf /data/pikpak_list.txt + echo ${PIKPAK_LIST} | tr ',' '\n' | while read line; do + user=$(echo $line | cut -d':' -f1) + pass=$(echo $line | cut -d':' -f2-) + echo "\"${user}\" \"${pass}\"" >> /data/pikpak_list.txt + done +fi + +# 开启强制登陆 +if [ "${FORCE_LOGIN}" = "true" ]; then + echo "已开启强制登陆..." + if [ ! -f /data/guestlogin.txt ]; then + touch /data/guestlogin.txt + fi +else + echo "已关闭强制登陆..." + rm -rf /data/guestlogin.txt +fi + +# 设置webdav密码 +if [ -n "${WEBDAV_PASSWORD}" ]; then + echo "设置webdav密码..." + echo "${WEBDAV_PASSWORD}" > /data/guestpass.txt +else + rm -rf /data/guestpass.txt +fi + crond crontabs="" @@ -49,7 +79,7 @@ fi if [ "${AUTO_CLEAR_ENABLED:=true}" = "true" ]; then echo "启动定时清理定时任务..." - crontabs="${crontabs}\n*/${AUTO_CLEAR_INTERVAL:=10} * * * * /clear.sh" + crontabs="${crontabs}\n*/${AUTO_CLEAR_INTERVAL:=180} * * * * /clear.sh" fi echo -e "$crontabs" | crontab -