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

read download/incomplete directory paths from settings.json #277

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cartfisk
Copy link

@cartfisk cartfisk commented Mar 8, 2024

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

This PR replaces hardcoded paths for directory creation/ownership with paths parsed from settings.json. If paths cannot be found in the file, defaults are used.

For standard installations, this change has no effect. In the case that a user sets a custom path for download-dir and/or incomplete-dir in settings.json, the run script will mkdir/lsiown the custom directories instead of the defaults.

Benefits of this PR and context:

Currently, even if a user changes the path(s) of download-dir/incomplete-dir in settings.json, the run script will still mkdir/lsiown the default directories (/downloads/complete & /downloads/incomplete) every time the container starts. Although these unused directories don't pose any serious issue, they can be a nuisance when navigating with autocomplete in the command line.

How Has This Been Tested?

Ran jenkins-builder.

Source / References:

#265
#256
#266

- prevents automatic creation of unused directories
- if `settings.json` contains `download-dir`/`incomplete-dir` properties, read the values and use them for `mkdir`/`lsiown` commands on container start
@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.5-r0-pkg-b53f7895-dev-7c9cc02fb6e48c7fe745c694f77e3ef9b2095d39-pr-277/index.html
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.5-r0-pkg-b53f7895-dev-7c9cc02fb6e48c7fe745c694f77e3ef9b2095d39-pr-277/shellcheck-result.xml

Tag Passed
amd64-4.0.5-r0-pkg-b53f7895-dev-7c9cc02fb6e48c7fe745c694f77e3ef9b2095d39-pr-277
arm64v8-4.0.5-r0-pkg-b53f7895-dev-7c9cc02fb6e48c7fe745c694f77e3ef9b2095d39-pr-277

@aptalca aptalca self-assigned this Mar 10, 2024
@cartfisk cartfisk force-pushed the no-dir-create-for-custom-path branch from 3c61175 to a96e3bc Compare March 11, 2024 17:32
@cartfisk cartfisk requested a review from plaes March 11, 2024 17:32
@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.5-r0-pkg-b53f7895-dev-a96e3bcbf04905c1e474bedf6e8fcf1827ac2db5-pr-277/index.html
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.5-r0-pkg-b53f7895-dev-a96e3bcbf04905c1e474bedf6e8fcf1827ac2db5-pr-277/shellcheck-result.xml

Tag Passed
amd64-4.0.5-r0-pkg-b53f7895-dev-a96e3bcbf04905c1e474bedf6e8fcf1827ac2db5-pr-277
arm64v8-4.0.5-r0-pkg-b53f7895-dev-a96e3bcbf04905c1e474bedf6e8fcf1827ac2db5-pr-277

@aptalca
Copy link
Member

aptalca commented Mar 11, 2024

lgtm
Please add a changelog entry into readme-vars.yml and make sure it's tested well :-)

@LinuxServer-CI
Copy link
Collaborator

This pull request 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.

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.5-r1-pkg-43837386-dev-b753e9d0fdb7eef0669e783c4fd14e547a276798-pr-277/index.html
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.5-r1-pkg-43837386-dev-b753e9d0fdb7eef0669e783c4fd14e547a276798-pr-277/shellcheck-result.xml

Tag Passed
amd64-4.0.5-r1-pkg-43837386-dev-b753e9d0fdb7eef0669e783c4fd14e547a276798-pr-277
arm64v8-4.0.5-r1-pkg-43837386-dev-b753e9d0fdb7eef0669e783c4fd14e547a276798-pr-277

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.5-r2-pkg-9e1fd792-dev-464d96ef8f86bc4c47e11274f9e0520a91675436-pr-277/index.html
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.5-r2-pkg-9e1fd792-dev-464d96ef8f86bc4c47e11274f9e0520a91675436-pr-277/shellcheck-result.xml

Tag Passed
amd64-4.0.5-r2-pkg-9e1fd792-dev-464d96ef8f86bc4c47e11274f9e0520a91675436-pr-277
arm64v8-4.0.5-r2-pkg-9e1fd792-dev-464d96ef8f86bc4c47e11274f9e0520a91675436-pr-277

Copy link
Member

@aptalca aptalca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changelog entry and testing

@LinuxServer-CI
Copy link
Collaborator

This pull request 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.

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-a7f0831e-dev-2ccc4b8ba7cc5ebcb191e6b225d799e4253629b9-pr-277/index.html
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-a7f0831e-dev-2ccc4b8ba7cc5ebcb191e6b225d799e4253629b9-pr-277/shellcheck-result.xml

Tag Passed
amd64-4.0.6-r0-pkg-a7f0831e-dev-2ccc4b8ba7cc5ebcb191e6b225d799e4253629b9-pr-277
arm64v8-4.0.6-r0-pkg-a7f0831e-dev-2ccc4b8ba7cc5ebcb191e6b225d799e4253629b9-pr-277

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-fbe20213-dev-a4c785cada1ec31094c6ae91dd7acd245f874b4a-pr-277/index.html
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-fbe20213-dev-a4c785cada1ec31094c6ae91dd7acd245f874b4a-pr-277/shellcheck-result.xml

Tag Passed
amd64-4.0.6-r0-pkg-fbe20213-dev-a4c785cada1ec31094c6ae91dd7acd245f874b4a-pr-277
arm64v8-4.0.6-r0-pkg-fbe20213-dev-a4c785cada1ec31094c6ae91dd7acd245f874b4a-pr-277

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-f68ac517-dev-de1e90c69a6866663f34b5d31cab7bb48456d513-pr-277/index.html
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-f68ac517-dev-de1e90c69a6866663f34b5d31cab7bb48456d513-pr-277/shellcheck-result.xml

Tag Passed
amd64-4.0.6-r0-pkg-f68ac517-dev-de1e90c69a6866663f34b5d31cab7bb48456d513-pr-277
arm64v8-4.0.6-r0-pkg-f68ac517-dev-de1e90c69a6866663f34b5d31cab7bb48456d513-pr-277

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-2cb64b31-dev-70e01e0b0728afada6359518a9753da9be41f97e-pr-277/index.html
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-2cb64b31-dev-70e01e0b0728afada6359518a9753da9be41f97e-pr-277/shellcheck-result.xml

Tag Passed
amd64-4.0.6-r0-pkg-2cb64b31-dev-70e01e0b0728afada6359518a9753da9be41f97e-pr-277
arm64v8-4.0.6-r0-pkg-2cb64b31-dev-70e01e0b0728afada6359518a9753da9be41f97e-pr-277

@LinuxServer-CI
Copy link
Collaborator

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-90692212-dev-ae35c336fe16386da5ff961a8e3179c3438a40f5-pr-277/index.html
https://ci-tests.linuxserver.io/lspipepr/transmission/4.0.6-r0-pkg-90692212-dev-ae35c336fe16386da5ff961a8e3179c3438a40f5-pr-277/shellcheck-result.xml

Tag Passed
amd64-4.0.6-r0-pkg-90692212-dev-ae35c336fe16386da5ff961a8e3179c3438a40f5-pr-277
arm64v8-4.0.6-r0-pkg-90692212-dev-ae35c336fe16386da5ff961a8e3179c3438a40f5-pr-277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: PRs Ready For Team Review
Development

Successfully merging this pull request may close these issues.

4 participants