2021-05-19 18:31:20 +01:00
|
|
|
#!/bin/sh
|
2020-06-26 12:19:29 +01:00
|
|
|
|
2021-05-19 18:31:20 +01:00
|
|
|
# Get the admin interface port from the configuration.
|
|
|
|
bind_port="$( grep -e 'bind_port' "${SNAP_DATA}/AdGuardHome.yaml" | awk -F ' ' '{print $2}' )"
|
|
|
|
readonly bind_port
|
|
|
|
|
|
|
|
if [ "$bind_port" = '' ]
|
|
|
|
then
|
|
|
|
xdg-open 'http://localhost:3000'
|
2020-06-26 12:19:29 +01:00
|
|
|
else
|
2021-05-19 18:31:20 +01:00
|
|
|
xdg-open "http://localhost:${bind_port}"
|
2020-06-26 12:19:29 +01:00
|
|
|
fi
|