标签:编写 data opp upload status awk app $nf bind
yum install nfs-utils rpcbind keepalived -y
while true
do
if [ `/etc/init.d/nfs status|awk ‘NR==2{print $NF}‘` = "stopped" ]
then
/etc/init.d/keepalived stop
fi
done
挂载服务器脚本内容:
while true
do
if [ `showmount -e 172.16.1.31|wc -l` -eq 0 ]
then
umount /application/nginx-1.10.3/html/blog/wp-content/uploads
umount /application/nginx-1.10.3/html/bbs/data/attachment/image
umount /application/nginx-1.10.3/html/www/uploads/allimg
mount -t nfs 172.16.1.30:/data/blog /application/nginx-1.10.3/html/blog/wp-content/uploads
mount -t nfs 172.16.1.30:/data/bbs /application/nginx-1.10.3/html/bbs/data/attachment/image
mount -t nfs 172.16.1.30:/data/www /application/nginx-1.10.3/html/www/uploads/allimg
exit
fi
done
标签:编写 data opp upload status awk app $nf bind
原文地址:http://www.cnblogs.com/zhangb8042/p/7542592.html