Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Add Branch plex-rclone #967

Open
1 task done
BitcircuitEU opened this issue Oct 15, 2024 · 11 comments
Open
1 task done

[FEAT] Add Branch plex-rclone #967

BitcircuitEU opened this issue Oct 15, 2024 · 11 comments
Labels
enhancement New feature or request no-issue-activity

Comments

@BitcircuitEU
Copy link

Is this a new feature request?

  • I have searched the existing issues

Name of mod

plex-rclone

Wanted change

Please add branch plex-rclone

Reason for change

Add Rclone Mod for Plex (and maybe jellyfin?) so that rclone mount can be used to utilize onedrive and other cloud storages as mount for mediafiles

Proposed code change

https://github.com/Abruccii/docker-mods/tree/plex-rclone

@BitcircuitEU BitcircuitEU added the enhancement New feature or request label Oct 15, 2024
@BitcircuitEU BitcircuitEU changed the title [FEAT] <title> [FEAT] Add Branch plex-rclone Oct 15, 2024
@aptalca
Copy link
Member

aptalca commented Oct 15, 2024

If it's just installing a single repo package, there is no need for a new mod. You can use the universal package install mod:
https://github.com/linuxserver/docker-mods/tree/universal-package-install

@BitcircuitEU
Copy link
Author

BitcircuitEU commented Oct 15, 2024

If it's just installing a single repo package, there is no need for a new mod. You can use the universal package install mod: https://github.com/linuxserver/docker-mods/tree/universal-package-install

thanks for the info, that already helps alot.
It is also possible to run a command on startup or create a service to mount rclone?

something like:
/usr/bin/rclone mount \ --config=/config/rclone/rclone.conf \ --allow-other \ --cache-dir=/tmp/rclone/vfs \ --no-modtime \ --stats=0 \ --bwlimit=30M \ --dir-cache-time=120m \ --vfs-cache-mode full \ --vfs-cache-max-size 20G \ --user-agent "ISV|rclone.org|rclone/v1.62.2" \ --onedrive-no-versions \ --tpslimit 2 \ --cache-info-age=60m rMount:/ /media

@thespad
Copy link
Member

thespad commented Oct 15, 2024

If you need a service or additional logic then you'd have to look at a full mod. If you just need to run a one-off command then a custom init script will suffice: https://www.linuxserver.io/custom

@BitcircuitEU
Copy link
Author

BitcircuitEU commented Oct 15, 2024

If you need a service or additional logic then you'd have to look at a full mod. If you just need to run a one-off command then a custom init script will suffice: https://www.linuxserver.io/custom

adding a file "Onedrive" to the custom-services folder according to the documentation you linked (i just changed the memcached command to rclone mount command) im getting the error
exec: fatal: unable to exec bash : No such file or directory

plex:
    image: linuxserver/plex
    container_name: plex
    runtime: nvidia
    environment:
      - TZ=Europe/Berlin
      - VERSION=docker
      - PUID=0
      - PGID=0
      #- PLEX_CLAIM=#
      - NVIDIA_VISIBLE_DEVICES=all
      - DOCKER_MODS=linuxserver/mods:universal-package-install
      - INSTALL_PACKAGES=rclone|fuse
    volumes:
      - C:\Plex\config:/config
      - C:\Plex\custom-services:/custom-services.d
    devices:
      - /dev/fuse
    privileged: true
    network_mode: service:wireguard
    restart: unless-stopped
#!/usr/bin/with-contenv bash

exec rclone mount --config=/config/rclone.conf --allow-other --no-modtime --stats=0 --dir-cache-time=120m --vfs-cache-mode full --user-agent "ISV|rclone.org|rclone/v1.62.2" --onedrive-no-versions --cache-info-age=60m Onedrive:/ /media

@thespad
Copy link
Member

thespad commented Oct 15, 2024

Did you make the file executable?

@BitcircuitEU
Copy link
Author

BitcircuitEU commented Oct 15, 2024

Did you make the file executable?

how am i supposed to change file permissions on first boot of the docker container?
As the folder custom-services on the host is on a windows directory i think there is no "executable" option to set there

but as the error states the script seems to fail when executing bash and not the rclone command itself

@thespad
Copy link
Member

thespad commented Oct 15, 2024

Don't put it in a Windows directory?

You could mount it into the container and then chmod +x from inside the container as another option. We don't advise using Windows paths with containers regardless, because it causes so many issues.

Are you using Docker Desktop or WSL?

@BitcircuitEU
Copy link
Author

Don't put it in a Windows directory?

You could mount it into the container and then chmod +x from inside the container as another option. We don't advise using Windows paths with containers regardless, because it causes so many issues.

Are you using Docker Desktop or WSL?

I am using Docker Desktop on Windows with WSL2 Engine.
I have added a Ubuntu WSL Machine and chmodded the Onedrive file from there.

That fixed half of the error. Now i am just getting
: No such file or directynable to exec bash

@thespad
Copy link
Member

thespad commented Oct 15, 2024

Probably Onedrive:/, you might have to quote or otherwise escape it.

@BitcircuitEU
Copy link
Author

Probably Onedrive:/, you might have to quote or otherwise escape it.

Not sure why but issue is still Windows. Tried it on a Linux Vm and it seems to work.
unfortunately i can't add a docker volume via compose to try this, might also be a windows issue.
I try to install docker directly to a Ubuntu WSL machine without all this docker desktop stuff, lets see if that helps.

@LinuxServer-CI
Copy link

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no-issue-activity
Projects
Status: Issues
Development

No branches or pull requests

4 participants