Last active
November 23, 2016 00:10
-
-
Save rwenz3l/54fed884a6941a0844189a004028bf79 to your computer and use it in GitHub Desktop.
Maintenance Script for ACD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "(===== Checks =====)" | |
if [[ -d "/share/acd-raw/plexcrypt" ]]; | |
then | |
echo "Properly Mounted"; | |
else | |
echo "Crashed"; | |
echo "(===== Unmount =====)" | |
echo "Unmount EncFS ACD" | |
fusermount -z -u /share/acd-dec | |
echo "Unmount ACD" | |
fusermount -z -u /share/acd-raw | |
sleep 2 | |
echo "(===== Mount ACD =====)" | |
echo "--> Clear Cache" | |
# possible error here: when the db is corrupt cc fails | |
acdcli cc | |
echo "--> Sync" | |
acdcli sync | |
echo "--> Mount" | |
/usr/local/bin/acdcli mount -ao /share/acd-raw | |
echo "(===== Mount EncFS =====)" | |
ENCFS6_CONFIG='/opt/encfs/encfs.xml' encfs /share/acd-raw/plexcrypt /share/acd-dec --stdinpass < ~/.enc | |
# echo "Mount UnionFS Plex" | |
# unionfs-fuse -o cow -o allow_other -o umask=000 /share/loc-raw=RW:/share/acd-dec=RO /mnt/plex/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment