appstore-1panel/apps/minio/2024-06-11/scripts/upgrade.sh

25 lines
567 B
Bash
Raw Normal View History

2024-03-07 11:13:45 +08:00
#!/bin/bash
if [[ -f ./.env ]]; then
if grep -q "MINIO_BROWSER_SESSION_DURATION" ./.env; then
echo "MINIO_BROWSER_SESSION_DURATION 已存在"
else
echo 'MINIO_BROWSER_SESSION_DURATION="12h"' >> ./.env
fi
2024-03-07 11:46:14 +08:00
if grep -q "MINIO_BROWSER=" ./.env; then
2024-03-07 11:13:45 +08:00
echo "MINIO_BROWSER 已存在"
else
echo 'MINIO_BROWSER="on"' >> ./.env
fi
if grep -q "MINIO_BROWSER_LOGIN_ANIMATION" ./.env; then
echo "MINIO_BROWSER_LOGIN_ANIMATION 已存在"
else
echo 'MINIO_BROWSER_LOGIN_ANIMATION="on"' >> ./.env
fi
else
echo ".env 文件不存在"
fi