2022-12-28 09:18:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
umask ${UMASK}
|
|
|
|
|
2024-01-05 07:52:30 +00:00
|
|
|
if [ "$1" = "version" ]; then
|
|
|
|
./alist version
|
|
|
|
else
|
2024-12-30 14:51:05 +00:00
|
|
|
if [ "$RUN_ARIA2" = "true" ]; then
|
|
|
|
chown -R ${PUID}:${PGID} /opt/aria2/
|
|
|
|
exec su-exec ${PUID}:${PGID} nohup aria2c \
|
|
|
|
--enable-rpc \
|
|
|
|
--rpc-allow-origin-all \
|
|
|
|
--conf-path=/opt/aria2/.aria2/aria2.conf \
|
|
|
|
>/dev/null 2>&1 &
|
|
|
|
fi
|
|
|
|
|
|
|
|
chown -R ${PUID}:${PGID} /opt/alist/
|
2024-01-05 07:52:30 +00:00
|
|
|
exec su-exec ${PUID}:${PGID} ./alist server --no-prefix
|
|
|
|
fi
|