Added desktop icon for a snap

This commit is contained in:
Andrey Meshkov
2020-07-16 20:25:39 +03:00
5 changed files with 40 additions and 6 deletions

6
scripts/snap/README.md Normal file
View File

@@ -0,0 +1,6 @@
# Snap GUI
These files are added to the AdGuard Home snap in order to add an app icon:
https://github.com/AdguardTeam/AdGuardHome/pull/1836
See .goreleaser.yml: snapcrafts.extra_files

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=AdGuard Home
Comment=Network-wide ads & trackers blocking DNS server
Exec=adguard-home.adguard-home-web
Icon=${SNAP}/meta/gui/adguard-home-web.png
Terminal=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,10 @@
#!/bin/bash
# Get admin tool port from configuration
bind_port=$(grep bind_port $SNAP_DATA/AdGuardHome.yaml | awk -F ' ' '{print $2}')
if [ -z "$bind_port" ]; then
xdg-open http://localhost:3000
else
xdg-open http://localhost:$bind_port
fi