-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Update run.sh to include lowercase I in hostname. #26
Open
simianspaceman
wants to merge
1
commit into
bigbeartechworld:master
Choose a base branch
from
simianspaceman:patch-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using more reliable IP detection methods
While
hostname -i
might work in some cases, it can be unreliable as it may return127.0.1.1
on some systems, which would break Nextcloud's external access. Consider using more reliable methods to detect the LAN IP.Here's a more robust implementation:
This solution:
ip
command which is more reliable📝 Committable suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that may be, however as written this does not resolve. ‘hostname -I’ results in the following error message followed by usage:
hostname: invalid option — ‘I’
![IMG_0176](https://private-user-images.githubusercontent.com/5641540/400210056-8fbe867c-0d07-4381-b3d2-86a7f3b9607a.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjk4MTgsIm5iZiI6MTczOTM2OTUxOCwicGF0aCI6Ii81NjQxNTQwLzQwMDIxMDA1Ni04ZmJlODY3Yy0wZDA3LTQzODEtYjNkMi04NmE3ZjNiOTYwN2EuanBlZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE0MTE1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQzM2JiOGVjZjYwZTgzOTU2YjYwZmFjZjBjY2MyMDMzYzA0YWE4ZTZkMjQ3ZDI0MjdjNjFiNmE3MGNmNDQ5ZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-mnJkirmkSNnT9h-pw2HMv5xix-Y73WI-dGIskFCsOk)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simianspaceman, thanks for clarifying why you switched to the lowercase
-i
. Indeed, some environments don’t recognize the uppercase-I
option, leading to that error. If you find thathostname -i
occasionally yields127.0.1.1
instead of your true LAN IP, you might consider switching to the more robustip
-based approach. Otherwise, if your environment is guaranteed to return the correct IP withhostname -i
, then this fix should resolve your immediate issue.✏️ Learnings added