Skip to content

Commit

Permalink
fix: bash install.sh script for mac os (#15874)
Browse files Browse the repository at this point in the history
fix: bash script for mac os

Fix the displayed IP address in bash script if hostname fails to return a string

Co-authored-by: Joseph McKenna <[email protected]>
  • Loading branch information
jtkmckenna and Joseph McKenna authored Feb 3, 2025
1 parent 06f077b commit 9358b4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ start_docker_compose() {
show_friendly_message() {
local ip_address
ip_address=$(hostname -I | awk '{print $1}')
# If length of ip_address is 0, then we are on a Mac
if [ ${#ip_address} -eq 0 ]; then
ip_address=$(ipconfig getifaddr en0)
fi
cat <<EOF
Successfully deployed Immich!
You can access the website or the mobile app at http://$ip_address:2283
Expand Down

0 comments on commit 9358b4d

Please sign in to comment.