mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-26 23:28:08 +03:00
Merge: snap desktop icon
* commit '82858474a5b165efb4181975067a36e3668b89da': Update adguard-home-web.sh Update adguard-home-web.sh Add web launcher for desktop users
This commit is contained in:
commit
d794b11e7a
5 changed files with 40 additions and 6 deletions
|
@ -10,8 +10,7 @@ before:
|
|||
- go generate ./...
|
||||
|
||||
builds:
|
||||
-
|
||||
main: ./main.go
|
||||
- main: ./main.go
|
||||
ldflags:
|
||||
- -s -w -X main.version={{.Version}} -X main.channel={{.Env.CHANNEL}} -X main.goarm={{.Env.GOARM}}
|
||||
env:
|
||||
|
@ -43,8 +42,7 @@ builds:
|
|||
goarch: mipsle
|
||||
|
||||
archives:
|
||||
-
|
||||
# Archive name template.
|
||||
- # Archive name template.
|
||||
# Defaults:
|
||||
# - if format is `tar.gz`, `tar.xz`, `gz` or `zip`:
|
||||
# - `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}`
|
||||
|
@ -62,8 +60,7 @@ archives:
|
|||
- README.md
|
||||
|
||||
snapcrafts:
|
||||
-
|
||||
name: adguard-home
|
||||
- name: adguard-home
|
||||
base: core18
|
||||
name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
|
||||
summary: Network-wide ads & trackers blocking DNS server
|
||||
|
@ -80,11 +77,24 @@ snapcrafts:
|
|||
confinement: strict
|
||||
publish: false
|
||||
license: GPL-3.0
|
||||
extra_files:
|
||||
- source: scripts/snap/local/adguard-home-web.sh
|
||||
destination: adguard-home-web.sh
|
||||
mode: 0755
|
||||
- source: scripts/snap/gui/adguard-home-web.desktop
|
||||
destination: meta/gui/adguard-home-web.desktop
|
||||
mode: 0644
|
||||
- source: scripts/snap/gui/adguard-home-web.png
|
||||
destination: meta/gui/adguard-home-web.png
|
||||
mode: 0644
|
||||
apps:
|
||||
adguard-home:
|
||||
command: AdGuardHome -w $SNAP_DATA --no-check-update
|
||||
plugs: [ network-bind ]
|
||||
daemon: simple
|
||||
adguard-home-web:
|
||||
command: adguard-home-web.sh
|
||||
plugs: [ desktop ]
|
||||
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
|
|
6
scripts/snap/README.md
Normal file
6
scripts/snap/README.md
Normal 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
|
8
scripts/snap/gui/adguard-home-web.desktop
Normal file
8
scripts/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
scripts/snap/gui/adguard-home-web.png
Normal file
BIN
scripts/snap/gui/adguard-home-web.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
10
scripts/snap/local/adguard-home-web.sh
Executable file
10
scripts/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
|
||||
|
Loading…
Reference in a new issue