mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2026-06-16 01:02:14 +08:00
@@ -16,14 +16,14 @@ if [ -f .env ]; then
|
||||
mkdir -p "$TRANSMISSION_ROOT_PATH/watch"
|
||||
|
||||
# setup-2 install theme
|
||||
if [ ! -d "$TRANSMISSION_ROOT_PATH/themes" ]; then
|
||||
mkdir -p "$TRANSMISSION_ROOT_PATH/themes"
|
||||
if [ ! -d "$TRANSMISSION_ROOT_PATH/ui/themes" ]; then
|
||||
mkdir -p "$TRANSMISSION_ROOT_PATH/ui/themes"
|
||||
|
||||
if command -v unzip >/dev/null 2>&1; then
|
||||
unzip -o themes/flood-for-transmission.zip -d "$TRANSMISSION_ROOT_PATH/themes"
|
||||
unzip -o themes/flood-for-transmission.zip -d "$TRANSMISSION_ROOT_PATH/ui/themes"
|
||||
UNZIP_SUCCESS=$?
|
||||
elif command -v tar >/dev/null 2>&1; then
|
||||
tar -xf themes/flood-for-transmission.zip -C "$TRANSMISSION_ROOT_PATH/themes"
|
||||
tar -xf themes/flood-for-transmission.zip -C "$TRANSMISSION_ROOT_PATH/ui/themes"
|
||||
UNZIP_SUCCESS=$?
|
||||
else
|
||||
echo "Warning: Neither 'unzip' nor 'tar' is installed. Skipping theme extraction."
|
||||
@@ -34,9 +34,9 @@ if [ -f .env ]; then
|
||||
echo "Theme successfully extracted."
|
||||
|
||||
if grep -q "^TRANSMISSION_WEB_HOME=" .env; then
|
||||
sed -i 's|^TRANSMISSION_WEB_HOME=.*|TRANSMISSION_WEB_HOME=/themes/flood-for-transmission|' .env
|
||||
sed -i 's|^TRANSMISSION_WEB_HOME=.*|TRANSMISSION_WEB_HOME=/ui/themes/flood-for-transmission|' .env
|
||||
else
|
||||
echo "TRANSMISSION_WEB_HOME=/themes/flood-for-transmission" >> .env
|
||||
echo "TRANSMISSION_WEB_HOME=/ui/themes/flood-for-transmission" >> .env
|
||||
fi
|
||||
else
|
||||
echo "Warning: Failed to extract the theme archive. Proceeding without extracted theme."
|
||||
|
||||
Reference in New Issue
Block a user