#!/bin/bash if [ $UID -ne 0 ]; then echo "请用root用户运行当前脚本 (su root)" && exit 1 fi root_dir=/opt/minio-store if [ ! -d "$root_dir" ]; then mkdir -p $root_dir fi # Don't delete `/` if [[ $root_dir == "/" ]]; then echo "root_dir is /, exit" exit 1 fi systemctl stop minio-store rm -rf $root_dir rm -f /usr/lib/systemd/system/minio-store.service echo "卸载成功!" systemctl daemon-reload