Advertisement
Guest User

Mount.Remote

a guest
Mar 28th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. #!/bin/sh
  2. ###############################################################################
  3.  
  4. . ${HOME}/.config/PlexACD/plexacd.conf
  5. . "$(dirname $0)/plexacd.sh"
  6. export ENCFS6_CONFIG="$encfs_cfg"
  7.  
  8. log "Checking FUSE filesystems."
  9.  
  10. if mountpoint -q $remotecrypt; then
  11. log "Encrypted ACD filesystem already mounted. Remounting now!"
  12. fusermount -uz $remotecrypt
  13. else
  14. log "Encrypted ACD filesystem not nmounted. Mounting now!"
  15. fi
  16. $rclonebin mount --allow-other --read-only --timeout=30s ${remotename}:${acdsubdir} "$remotecrypt" &
  17.  
  18. if mountpoint -q $remotedecrypt; then
  19. log "Decrypted ACD filesystem already mounted. Remounting now!"
  20. fusermount -uz $remotedecrypt
  21. else
  22. log "Decrypted ACD filesystem not nmounted. Mounting now!"
  23. fi
  24. encfs --extpass="echo $encfs_pass" $remotecrypt $remotedecrypt -o allow_root
  25.  
  26. if mountpoint -q $localdecrypt; then
  27. log "Decrypted local filesystem already mounted. Remounting now!"
  28. fusermount -uz $localdecrypt
  29. else
  30. log "Decrypted local filesystem not nmounted. Mounting now!"
  31. fi
  32. encfs --extpass="echo $encfs_pass" $localcrypt $localdecrypt -o allow_root
  33.  
  34. if mountpoint -q $mediadir; then
  35. log "Union filesystem already mounted. Remounting now!"
  36. fusermount -uz $mediadir
  37. else
  38. log "Union filesystem not nmounted. Mounting now!"
  39. fi
  40. ${ufsbin} -o cow ${localdecrypt}=RW:${remotedecrypt}=RO $mediadir
  41.  
  42. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement