说明:
1、判断samba服务进程是否存在,如果存在请确认是否能卸载
2、如果samba服务进程不存在,直接卸载samba服务
1、编写shell
#! /bin/bash
#******************************************************
# Author : 枫叶20214
# Last modified : 2023-02-21
# Filename : uninstall-samba.sh
# Description : 卸载samba服务
#*******************************************************
set -e
# 判断samba服务是否存在
num=`ps aux |egrep "smb|nmb"