Add web launcher for desktop users
This commit is contained in:
parent
7a77dadab0
commit
8863e61e8e
8
packaging/snap/gui/adguard-home-web.desktop
Normal file
8
packaging/snap/gui/adguard-home-web.desktop
Normal 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
|
BIN
packaging/snap/gui/adguard-home-web.png
Normal file
BIN
packaging/snap/gui/adguard-home-web.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
10
packaging/snap/local/adguard-home-web.sh
Executable file
10
packaging/snap/local/adguard-home-web.sh
Executable 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
|
||||
|
@ -14,7 +14,16 @@ description: |
|
||||
grade: stable
|
||||
confinement: strict
|
||||
|
||||
architectures:
|
||||
- build-on: amd64
|
||||
- build-on: armhf
|
||||
- build-on: i386
|
||||
- build-on: arm64
|
||||
|
||||
parts:
|
||||
web-launcher:
|
||||
plugin: dump
|
||||
source: snap/local
|
||||
adguard-home:
|
||||
plugin: make
|
||||
source: .
|
||||
@ -29,4 +38,7 @@ apps:
|
||||
command: AdGuardHome -w ${SNAP_DATA} --no-check-update
|
||||
plugs: [ network-bind ]
|
||||
daemon: simple
|
||||
restart-condition: always
|
||||
restart-condition: always
|
||||
adguard-home-web:
|
||||
command: adguard-home-web.sh
|
||||
plugs: [desktop]
|
8
snap/gui/adguard-home-web.desktop
Normal file
8
snap/gui/adguard-home-web.desktop
Normal 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
|
BIN
snap/gui/adguard-home-web.png
Normal file
BIN
snap/gui/adguard-home-web.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
10
snap/local/adguard-home-web.sh
Executable file
10
snap/local/adguard-home-web.sh
Executable 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
|
||||
|
@ -24,6 +24,9 @@ architectures:
|
||||
- build-on: arm64
|
||||
|
||||
parts:
|
||||
web-launcher:
|
||||
plugin: dump
|
||||
source: snap/local
|
||||
adguard-home:
|
||||
plugin: make
|
||||
source: .
|
||||
@ -39,3 +42,6 @@ apps:
|
||||
plugs: [ network-bind ]
|
||||
daemon: simple
|
||||
restart-condition: always
|
||||
adguard-home-web:
|
||||
command: adguard-home-web.sh
|
||||
plugs: [desktop]
|
Loading…
Reference in New Issue
Block a user