nas-remount 515 B

12345678910111213141516171819202122
  1. #! /bin/sh
  2. source ~/.config/secretsrc
  3. SUDOCMD=doas
  4. IPADDR=192.168.88.4
  5. MNT_OPT="noatime,nolock,defaults,rsize=8192,wsize=8192,vers=3"
  6. # MNT_OPT="hard,nofail,noatime,nodiratime,timeo=10,retrans=1,retry=1,nolock,nfsvers=3,proto=udp,_netdev"
  7. if [ "$1" = "hard" ]
  8. then
  9. $SUDOCMD umount -lf /mnt/curl
  10. $SUDOCMD umount -lf /mnt/volb
  11. $SUDOCMD mount.nfs4 $IPADDR:/shares/volb /mnt/volb -v -o $MNT_OPT
  12. fi
  13. $SUDOCMD killall curlftpfs
  14. $SUDOCMD curlftpfs -o nonempty,allow_other $SECRET_FTP_AUTH@$IPADDR /mnt/curl
  15. exit 0