完善应用安装

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
新疆萌森软件开发工作室 2025-01-26 15:26:39 +08:00
parent a4cb512228
commit 9913dfc641
2 changed files with 7 additions and 5 deletions

View File

@ -18,7 +18,7 @@ services:
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${TRANSMISSION_ROOT_PATH}/ui/themes:/ui/themes
- ${TRANSMISSION_ROOT_PATH}/themes:/themes
- ${TRANSMISSION_ROOT_PATH}/config:/config
- ${TRANSMISSION_ROOT_PATH}/downloads:/downloads
- ${TRANSMISSION_ROOT_PATH}/watch:/watch

View File

@ -11,14 +11,14 @@ if [ -f .env ]; then
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
# setup-2 install theme
if [ ! -d "$TRANSMISSION_ROOT_PATH/ui/themes" ]; then
mkdir -p "$TRANSMISSION_ROOT_PATH/ui/themes"
if [ ! -d "$TRANSMISSION_ROOT_PATH/themes" ]; then
mkdir -p "$TRANSMISSION_ROOT_PATH/themes"
if command -v unzip >/dev/null 2>&1; then
unzip -o themes/flood-for-transmission.zip -d "$TRANSMISSION_ROOT_PATH/ui/themes"
unzip -o themes/flood-for-transmission.zip -d "$TRANSMISSION_ROOT_PATH/themes"
UNZIP_SUCCESS=$?
elif command -v tar >/dev/null 2>&1; then
tar -xf themes/flood-for-transmission.zip -C "$TRANSMISSION_ROOT_PATH/ui/themes"
tar -xf themes/flood-for-transmission.zip -C "$TRANSMISSION_ROOT_PATH/themes"
UNZIP_SUCCESS=$?
else
echo "Warning: Neither 'unzip' nor 'tar' is installed. Skipping theme extraction."
@ -40,6 +40,8 @@ if [ -f .env ]; then
echo "Themes directory already exists. Skipping extraction."
fi
chown -R 1000:1000 "$TRANSMISSION_ROOT_PATH"
echo "Check Finish."
else