1234567891011121314151617181920212223242526 |
- #! /bin/bash
- if [ $UID -ne 0 ]; then
- echo "请用root用户运行当前脚本 (su root)" && exit 1
- fi
- if [ -r /opt/minio-into-stck/minio-into-stck ];then
- echo "/opt/minio-into-stck/minio-into-stck文件夹已存在,请重命名旧版本文件后再尝试"
- exit
- fi
- root_dir=/opt/minio-into-stck
- if [ ! -d "$root_dir" ]; then
- mkdir -p $root_dir
- fi
- tar zxf ./minio-into-stck.tar.gz -C $root_dir
- cp -f minio-into-stck.service /usr/lib/systemd/system/
- if [ ! -r /opt/minio-into-stck/minio-into-stck ];then
- echo "安装失败!"
- exit
- else
- echo "安装成功!"
- fi
- chmod +x /opt/minio-into-stck/minio-into-stck/*.sh
- chmod +x /opt/minio-into-stck/minio-into-stck/minio-into-stck
- systemctl daemon-reload
|