Jump to content

bar1

Members
  • Content Count

    49
  • Joined

  • Last visited

Community Reputation

0 Neutral

About bar1

  • Rank
    Advanced Member

Converted

  • Gender
    Undisclosed
  1. Hi, I have a plex docker thats running ok, but i need to get the plex auto scan script to run. I believe there is a docker with the script included, but couldn't find it in the unraid repository, i then tried to run the script on a VM but not sure if it's possible. is anyone running a plex docker with the autoscan script in unraid? would like to know whats the best way to do this, Thanks, Bar1
  2. Wait a second....the one drive i am testing on is not mine, and my access to it is read only.
  3. alright , i deployed script 0.95.0 and it works. i am getting errors... mount failed - please check for problems. and Attempt 1/3 failed with 1 errors and: googleapi: Error 403: Insufficient Permission: Request had insufficient authentication scopes., and, mountcheck: Need to transfer - File not found at Destination 2020/02/14 17:16:30 ERROR : mountcheck: Failed to copy: googleapi: Error 403: Insufficient Permission: Request had insufficient authentication scopes., but the bottom line is: drive is mounted. will investigate the errors over the weekend.
  4. Maybe i didn't understand correctly "and your rclone config (remote passwords) please" umm....that will be a very stupid thing to do?lol but i think the rclone config is good because i mount the drives "manually" just fine.
  5. #!/bin/bash ###################### #### Mount Script #### ###################### ### Version 0.96.0 ### ###################### ####### EDIT ONLY THESE SETTINGS ####### # INSTRUCTIONS # 1. Edit the change the name of the rclone remote and shares to match your setup # 2. NOTE: enter RcloneRemoteName WITHOUT ':' # 3. Optional: include custom command and bind mount settings # 4. Optional: include extra folders in mergerfs mount # REQUIRED SETTINGS RcloneRemoteName="Bar1-xxx" # Name of rclone remote mount WITHOUT ':'. NOTE: Choose your encrypted remote for sensitive data #RcloneRemoteName="Bar1-xxx" # Name of rclone remote mount WITHOUT ':'. NOTE: Choose your encrypted remote for sensitive data LocalFilesShare="/mnt/user/Media" # location of the local files you want to upload without trailing slash to rclone e.g. /mnt/user/local RcloneMountShare="/mnt/user/Bar1-Rxxx" # where your rclone remote will be located without trailing slash e.g. /mnt/user/mount_rclone MergerfsMountShare="ignore" # location without trailing slash e.g. /mnt/user/mount_mergerfs of the share you will use for Plex, Sonarr etc that combines files on your server's 'LocalFilesShare' with files on gdrive 'RcloneMountShare' DockerStart="Bar1-xxx" # list of dockers, separated by space, to start once mergerfs mount verified. Remember to disable AUTOSTART in docker settings page MountFolders=\{"downloads/complete,downloads/intermediate,downloads/seeds,movies,tv"\} # comma separated list of folders to create within the mount # Note: Again - remember to NOT use ':' in your remote name above # OPTIONAL SETTINGS # Add extra paths to mergerfs mount in addition to LocalFilesShare LocalFilesShare2="ignore" # without trailing slash e.g. //mnt/user/. Enter 'ignore' to disable LocalFilesShare3="ignore" LocalFilesShare4="ignore" # Add extra commands or filters Command1="--rc" Command2="" Command3="" Command4="" Command5="" Command6="" Command7="" Command8="" CreateBindMount="N" # Y/N. Choose whether to bind traffic to a particular network adapter RCloneMountIP="192.168.1.201" # My unraid IP is 172.30.12.2 so I create another similar IP address NetworkAdapter="eth0" # choose your network adapter. eth0 recommended VirtualIPNumber="2" # creates eth0:x e.g. eth0:1. I create a unique virtual IP addresses for each mount & upload so I can monitor and traffic shape for each of them ####### END SETTINGS ####### ############################################################################### ######## DO NOT EDIT ANYTHING UNLESS YOU KNOW WHAT YOU ARE DOING ########## ############################################################################### ####### Preparing mount location variables ####### LocalFilesLocation="$LocalFilesShare/$RcloneRemoteName" # Location for local files to be merged with rclone mount RcloneMountLocation="$RcloneMountShare/$RcloneRemoteName" # Location for rclone mount MergerFSMountLocation="$MergerfsMountShare/$RcloneRemoteName" # Rclone data folder location ####### create directories for rclone mount and mergerfs mounts ####### mkdir -p /mnt/user/appdata/other/rclone/remotes/$RcloneRemoteName # for script files eval mkdir -p $LocalFilesLocation/"$MountFolders" mkdir -p $RcloneMountLocation mkdir -p $MergerFSMountLocation ####### Check if script is already running ####### echo "$(date "+%d.%m.%Y %T") INFO: *** Starting mount of remote ${RcloneRemoteName}" echo "$(date "+%d.%m.%Y %T") INFO: Checking if this script is already running." if [[ -f "/mnt/user/appdata/other/rclone/remotes/$RcloneRemoteName/mount_running" ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Exiting script as already running." exit else echo "$(date "+%d.%m.%Y %T") INFO: Script not running - proceeding." touch /mnt/user/appdata/other/rclone/remotes/$RcloneRemoteName/mount_running fi ####### Check If Rclone Mount Already Created ####### if [[ -f "$RcloneMountLocation/mountcheck" ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Success ${RcloneRemoteName} remote is already mounted." else echo "$(date "+%d.%m.%Y %T") INFO: Mount not running. Will now mount ${RcloneRemoteName} remote." ####### Create RClone Mount ####### # Check If Rclone Mount Already Created if [[ -f "$RcloneMountLocation/mountcheck" ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Success ${RcloneRemoteName} remote is already mounted." else echo "$(date "+%d.%m.%Y %T") INFO: Mount not running. Will now mount ${RcloneRemoteName} remote." # Creating mountcheck file in case it doesn't already exist echo "$(date "+%d.%m.%Y %T") INFO: Recreating mountcheck file for ${RcloneRemoteName} remote." touch mountcheck rclone copy mountcheck $RcloneRemoteName: -vv --no-traverse echo "$(date "+%d.%m.%Y %T") INFO: Completed creation of mountcheck file for ${RcloneRemoteName} remote." # Check bind option if [[ $CreateBindMount == 'Y' ]]; then echo "$(date "+%d.%m.%Y %T") INFO: *** Checking if IP address ${RCloneMountIP} already created for remote ${RcloneRemoteName}" ping -q -c2 $RCloneMountIP > /dev/null # -q quiet, -c number of pings to perform if [ $? -eq 0 ]; then # ping returns exit status 0 if successful echo "$(date "+%d.%m.%Y %T") INFO: *** IP address ${RCloneMountIP} already created for remote ${RcloneRemoteName}" else echo "$(date "+%d.%m.%Y %T") INFO: *** Creating IP address ${RCloneMountIP} for remote ${RcloneRemoteName}" ip addr add $RCloneMountIP/24 dev $NetworkAdapter label $NetworkAdapter:$VirtualIPNumber fi else RCloneMountIP="" fi # create rclone mount echo "$(date "+%d.%m.%Y %T") INFO: *** Creating bind mount ${RCloneMountIP} for remote ${RcloneRemoteName}" rclone mount \ --allow-other \ --buffer-size 256M \ --dir-cache-time 720h \ --drive-chunk-size 512M \ --log-level INFO \ --vfs-read-chunk-size 128M \ --vfs-read-chunk-size-limit off \ --vfs-cache-mode writes \ --bind=$RCloneMountIP \ $RcloneRemoteName: $RcloneMountLocation & # Check if Mount Successful echo "$(date "+%d.%m.%Y %T") INFO: sleeping for 5 seconds" # slight pause to give mount time to finalise sleep 5 echo "$(date "+%d.%m.%Y %T") INFO: continuing..." if [[ -f "$RcloneMountLocation/mountcheck" ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Successful mount of ${RcloneRemoteName} mount." else echo "$(date "+%d.%m.%Y %T") CRITICAL: ${RcloneRemoteName} mount failed - please check for problems." rm /mnt/user/appdata/other/rclone/remotes/$RcloneRemoteName/mount_running exit fi fi ####### Start MergerFS Mount ####### if [[ $MergerfsMountShare == 'ignore' ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Not creating mergerfs mount as requested." else if [[ -f "$MergerFSMountLocation/mountcheck" ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Check successful, ${RcloneRemoteName} mergerfs mount in place." else # check if mergerfs already installed if [[ -f "/bin/mergerfs" ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Mergerfs already installed, proceeding to create mergerfs mount" else # Build mergerfs binary echo "$(date "+%d.%m.%Y %T") INFO: Mergerfs not installed - installing now." mkdir -p /mnt/user/appdata/other/rclone/mergerfs docker run -v /mnt/user/appdata/other/rclone/mergerfs:/build --rm trapexit/mergerfs-static-build mv /mnt/user/appdata/other/rclone/mergerfs/mergerfs /bin fi # Create mergerfs mount echo "$(date "+%d.%m.%Y %T") INFO: Creating ${RcloneRemoteName} mergerfs mount." # Extra Mergerfs folders if [[ $LocalFilesShare2 != 'ignore' ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Adding ${LocalFilesShare2} to ${RcloneRemoteName} mergerfs mount." LocalFilesShare2=":$LocalFilesShare2" else LocalFilesShare2="" fi if [[ $LocalFilesShare3 != 'ignore' ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Adding ${LocalFilesShare3} to ${RcloneRemoteName} mergerfs mount." LocalFilesShare3=":$LocalFilesShare3" else LocalFilesShare3="" fi if [[ $LocalFilesShare4 != 'ignore' ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Adding ${LocalFilesShare4} to ${RcloneRemoteName} mergerfs mount." LocalFilesShare4=":$LocalFilesShare4" else LocalFilesShare4="" fi # mergerfs mount command mergerfs $LocalFilesLocation:$RcloneMountLocation$LocalFilesShare2$LocalFilesShare3$LocalFilesShare4 $MergerFSMountLocation -o rw,async_read=false,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true # check if mergerfs mount successful echo "$(date "+%d.%m.%Y %T") INFO: Checking if ${RcloneRemoteName} mergerfs mount created." if [[ -f "$MergerFSMountLocation/mountcheck" ]]; then echo "$(date "+%d.%m.%Y %T") INFO: Check successful, ${RcloneRemoteName} mergerfs mount created." else echo "$(date "+%d.%m.%Y %T") CRITICAL: ${RcloneRemoteName} mergerfs mount failed." rm /mnt/user/appdata/other/rclone/remotes/$RcloneRemoteName/mount_running exit fi fi fi ####### Starting Dockers That Need Mergerfs Mount To Work Properly ####### # only start dockers once if [[ -f "/mnt/user/appdata/other/rclone/remotes/$RcloneRemoteName/dockers_started" ]]; then echo "$(date "+%d.%m.%Y %T") INFO: dockers already started." else touch /mnt/user/appdata/other/rclone/remotes/$RcloneRemoteName/dockers_started echo "$(date "+%d.%m.%Y %T") INFO: Starting dockers." docker start $DockerStart fi rm /mnt/user/appdata/other/rclone/remotes/$RcloneRemoteName/mount_running echo "$(date "+%d.%m.%Y %T") INFO: Script complete" exit 14.02.2020 13:44:20 INFO: *** Starting mount of remote Bar1-xxxx 14.02.2020 13:44:20 INFO: Checking if this script is already running. 14.02.2020 13:44:20 INFO: Script not running - proceeding. /tmp/user.scripts/tmpScripts/Rclone/script: line 206: syntax error: unexpected end of file Script Finished Fri, 14 Feb 2020 13:44:20 +0200 Full logs for this script are available at /tmp/user.scripts/tmpScripts/Rclone/log.txt
  6. can i make the script mount 2 drives? (like i tried to do).
  7. ok i followed the instructions properly this time (i think...). but the drive doesn't map. i am getting this: /tmp/user.scripts/tmpScripts/Rclone/script: line 206: syntax error: unexpected end of file
  8. stupid question, but if i want to use this script i need modify : /boot/config/plugins/rclone/scripts/rclone_mount_plugin/script ? seems like i can't modify it via the gui (toolong?) EDIT: busy installing:User Scripts
  9. everything was working fine...i did a small change to cpu allocation , through basic editor and now i am stuck in a boot loop.... Can anyone assist? After fixing this: <loader readonly='yes' type='pflash'>xxx</loader> <nvram>xxx</nvram> I am getting something like loading boot003 "clover start boot.efi"
  10. bar1

    [Plugin] rclone

    ok noted, i will install your plugin from the CA. I already have rclone mount docker up and running....so hopefully it wont conflict
  11. bar1

    [Plugin] rclone

    plugin: installing: https://raw.githubusercontent.com/Waseh/rclone-unraid/master/rclone.plg plugin: downloading https://raw.githubusercontent.com/Waseh/rclone-unraid/master/rclone.plg plugin: downloading: https://raw.githubusercontent.com/Waseh/rclone-unraid/master/rclone.plg ... done plugin: downloading: http://downloads.rclone.org/rclone-v1.35-linux-amd64.zip ... failed (Invalid URL / Server error response) plugin: wget: http://downloads.rclone.org/rclone-v1.35-linux-amd64.zip download failure (Invalid URL / Server error response)
  12. yes i did. I deleted everything nextcloud related, and reinstalled and waited an hour.
  13. bar1

    [Plugin] rclone

    is this plugin still working? I am getting: plugin: installing: https://raw.githubusercontent.com/Waseh/rclone-unraid/beta/rclone.plg plugin: downloading https://raw.githubusercontent.com/Waseh/rclone-unraid/beta/rclone.plg plugin: downloading: https://raw.githubusercontent.com/Waseh/rclone-unraid/beta/rclone.plg ... done plugin: downloading: http://beta.rclone.org/v1.34-11-gbf243f3/rclone-v1.34-11-gbf243f3β-linux-amd64.zip ... failed (Invalid URL / Server error response) plugin: wget: http://beta.rclone.org/v1.34-11-gbf243f3/rclone-v1.34-11-gbf243f3β-linux-amd64.zip download failure (Invalid URL / Server error response)
  14. oh i assume it's this one: will give it a try!
  15. Thanks for the reply. Yes i am talking about shared drive, i am already using rclone mount docker, for plex. hmmm....is that the plugin?i will still need to set up rclone sync via crontab