mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-19 04:06:18 +08:00
refactor(ci): add permissions check at docker's entrypoint (#1128)
Co-authored-by: MadDogOwner <xiaoran@xrgzs.top>
This commit is contained in:
@ -5,9 +5,23 @@ umask ${UMASK}
|
|||||||
if [ "$1" = "version" ]; then
|
if [ "$1" = "version" ]; then
|
||||||
./openlist version
|
./openlist version
|
||||||
else
|
else
|
||||||
|
# Check file of /opt/openlist/data permissions for current user
|
||||||
|
# 检查当前用户是否有当前目录的写和执行权限
|
||||||
|
if [ -d ./data ]; then
|
||||||
|
if ! [ -w ./data ] || ! [ -x ./data ]; then
|
||||||
|
cat <<EOF
|
||||||
|
Error: Current user does not have write and/or execute permissions for the ./data directory: $(pwd)/data
|
||||||
|
Please visit https://doc.oplist.org/guide/installation/docker#for-version-after-v4-1-0 for more information.
|
||||||
|
错误:当前用户没有 ./data 目录($(pwd)/data)的写和/或执行权限。
|
||||||
|
请访问 https://doc.oplist.org/guide/installation/docker#v4-1-0-%E4%BB%A5%E5%90%8E%E7%89%88%E6%9C%AC 获取更多信息。
|
||||||
|
Exiting...
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Define the target directory path for aria2 service
|
# Define the target directory path for aria2 service
|
||||||
ARIA2_DIR="/opt/service/start/aria2"
|
ARIA2_DIR="/opt/service/start/aria2"
|
||||||
|
|
||||||
if [ "$RUN_ARIA2" = "true" ]; then
|
if [ "$RUN_ARIA2" = "true" ]; then
|
||||||
# If aria2 should run and target directory doesn't exist, copy it
|
# If aria2 should run and target directory doesn't exist, copy it
|
||||||
if [ ! -d "$ARIA2_DIR" ]; then
|
if [ ! -d "$ARIA2_DIR" ]; then
|
||||||
|
Reference in New Issue
Block a user