Skip to content

Commit 9358b4d

Browse files
jtkmckennaJoseph McKenna
andauthored
fix: bash install.sh script for mac os (#15874)
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]>
1 parent 06f077b commit 9358b4d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ start_docker_compose() {
5151
show_friendly_message() {
5252
local ip_address
5353
ip_address=$(hostname -I | awk '{print $1}')
54+
# If length of ip_address is 0, then we are on a Mac
55+
if [ ${#ip_address} -eq 0 ]; then
56+
ip_address=$(ipconfig getifaddr en0)
57+
fi
5458
cat <<EOF
5559
Successfully deployed Immich!
5660
You can access the website or the mobile app at http://$ip_address:2283

0 commit comments

Comments
 (0)