shell脚本实现nfs服务安装配置,共享文件分发

##############################Deploy nfs########################
echo "start deploy nfs-server"

cat $basepath/package/exports > /etc/exports

systemctl restart rpcbind
systemctl enable rpcbind

systemctl restart nfs
systemctl enable nfs

rm -rf /root/STBVerify/
cp -r $basepath/package/S********y /root/
cd /root/********y/
chmod 777 P******ate/
chmod +x P*****m/
chmod +x P******am/*

rpcbindpid=`ps aux|grep rpcbind|grep -v "grep"|awk '{print $2}'`

if [ "$rpcbindpid" ];then
echo "success ! rpcbind is running now"
fi

nfspid=`ps aux|grep nfs|grep -v "grep"|awk '{print $2}'`

if [ "$nfspid" ];then
echo "success ! nfs-server is running now"
fi

  

posted @ 2018-02-07 09:45  Oops!#  阅读(696)  评论(0编辑  收藏  举报