#!/bin/bash set -e if [ $UID -ne 0 ]; then echo "请用root用户运行当前脚本 (su root)" && exit 1 fi config_dir="/opt/minio-into-stck/minio-into-stck/config" if [ ! -d "$config_dir" ]; then echo "配置文件夹不存在,请检查是否安装了minio-into-stck" exit fi echo "正在更新minio-into-stck..." rm -rf /tmp/minio-into-stck-tmp mkdir -p /tmp/minio-into-stck-tmp cp -rf $config_dir /tmp/minio-into-stck-tmp ./uninstall.sh ./install.sh echo "正在恢复配置文件..." rsync -a --delete /tmp/minio-into-stck-tmp/config/ "$config_dir" chmod 777 -R $config_dir rm -rf /tmp/minio-into-stck-tmp echo "更新完成!" systemctl start minio-into-stck echo "minio-into-stck已启动"