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
|
@ -10,8 +10,7 @@ before:
|
||||||
- go generate ./...
|
- go generate ./...
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
-
|
- main: ./main.go
|
||||||
main: ./main.go
|
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Version}} -X main.channel={{.Env.CHANNEL}} -X main.goarm={{.Env.GOARM}}
|
- -s -w -X main.version={{.Version}} -X main.channel={{.Env.CHANNEL}} -X main.goarm={{.Env.GOARM}}
|
||||||
env:
|
env:
|
||||||
|
@ -43,8 +42,7 @@ builds:
|
||||||
goarch: mipsle
|
goarch: mipsle
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
-
|
- # Archive name template.
|
||||||
# Archive name template.
|
|
||||||
# Defaults:
|
# Defaults:
|
||||||
# - if format is `tar.gz`, `tar.xz`, `gz` or `zip`:
|
# - if format is `tar.gz`, `tar.xz`, `gz` or `zip`:
|
||||||
# - `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}`
|
# - `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}`
|
||||||
|
@ -62,8 +60,7 @@ archives:
|
||||||
- README.md
|
- README.md
|
||||||
|
|
||||||
snapcrafts:
|
snapcrafts:
|
||||||
-
|
- name: adguard-home
|
||||||
name: adguard-home
|
|
||||||
base: core18
|
base: core18
|
||||||
name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
|
name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
|
||||||
summary: Network-wide ads & trackers blocking DNS server
|
summary: Network-wide ads & trackers blocking DNS server
|
||||||
|
@ -80,11 +77,24 @@ snapcrafts:
|
||||||
confinement: strict
|
confinement: strict
|
||||||
publish: false
|
publish: false
|
||||||
license: GPL-3.0
|
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:
|
apps:
|
||||||
adguard-home:
|
adguard-home:
|
||||||
command: AdGuardHome -w $SNAP_DATA --no-check-update
|
command: AdGuardHome -w $SNAP_DATA --no-check-update
|
||||||
plugs: [ network-bind ]
|
plugs: [ network-bind ]
|
||||||
daemon: simple
|
daemon: simple
|
||||||
|
adguard-home-web:
|
||||||
|
command: adguard-home-web.sh
|
||||||
|
plugs: [ desktop ]
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
|
|
|
@ -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
|
|
@ -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 |
|
@ -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 New Issue