Skip to content

Commit 10a14f1

Browse files
authored
fix(docker): improve startup process and SIGTERM handling (#1089)
* fix(ci): Modify the way of star OpenList. * fix(ci): start runsvdir
1 parent f86ebc5 commit 10a14f1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

entrypoint.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ umask ${UMASK}
55
if [ "$1" = "version" ]; then
66
./openlist version
77
else
8-
# Define the target directory path for openlist service
9-
OPENLIST_DIR="/opt/service/start/openlist"
10-
if [ ! -d "$OPENLIST_DIR" ]; then
11-
cp -r /opt/service/stop/openlist "$OPENLIST_DIR" 2>/dev/null
12-
fi
138
# Define the target directory path for aria2 service
149
ARIA2_DIR="/opt/service/start/aria2"
1510

@@ -19,12 +14,12 @@ else
1914
mkdir -p "$ARIA2_DIR"
2015
cp -r /opt/service/stop/aria2/* "$ARIA2_DIR" 2>/dev/null
2116
fi
17+
runsvdir /opt/service/start &
2218
else
2319
# If aria2 should NOT run and target directory exists, remove it
2420
if [ -d "$ARIA2_DIR" ]; then
2521
rm -rf "$ARIA2_DIR"
2622
fi
2723
fi
28-
29-
exec runsvdir /opt/service/start
24+
exec ./openlist server --no-prefix
3025
fi

0 commit comments

Comments
 (0)