From 8863e61e8e1394c0f590b179953989953bf620b5 Mon Sep 17 00:00:00 2001 From: Alan Pope Date: Fri, 26 Jun 2020 12:19:29 +0100 Subject: [PATCH 1/3] Add web launcher for desktop users --- packaging/snap/gui/adguard-home-web.desktop | 8 ++++++++ packaging/snap/gui/adguard-home-web.png | Bin 0 -> 1594 bytes packaging/snap/local/adguard-home-web.sh | 10 ++++++++++ packaging/snap/snapcraft.yaml | 14 +++++++++++++- snap/gui/adguard-home-web.desktop | 8 ++++++++ snap/gui/adguard-home-web.png | Bin 0 -> 1594 bytes snap/local/adguard-home-web.sh | 10 ++++++++++ snapcraft.yaml => snap/snapcraft.yaml | 6 ++++++ 8 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 packaging/snap/gui/adguard-home-web.desktop create mode 100644 packaging/snap/gui/adguard-home-web.png create mode 100755 packaging/snap/local/adguard-home-web.sh create mode 100644 snap/gui/adguard-home-web.desktop create mode 100644 snap/gui/adguard-home-web.png create mode 100755 snap/local/adguard-home-web.sh rename snapcraft.yaml => snap/snapcraft.yaml (90%) diff --git a/packaging/snap/gui/adguard-home-web.desktop b/packaging/snap/gui/adguard-home-web.desktop new file mode 100644 index 00000000..3d68d8b0 --- /dev/null +++ b/packaging/snap/gui/adguard-home-web.desktop @@ -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 diff --git a/packaging/snap/gui/adguard-home-web.png b/packaging/snap/gui/adguard-home-web.png new file mode 100644 index 0000000000000000000000000000000000000000..ce3555c05c3d5059365df1bdfbb988bf81093795 GIT binary patch literal 1594 zcmZWpX;4#V6#ZTT2>~gIvMUm#D5Btl$QIE=B|_9hB?zcgLBs$CQ6b9OJZLPqluZjd zieb|R+!Ym21E>ft5l~zaS%Pdvb|`@?eYDdboz9$l&pr3vGjqQ`-?7bXFMVBeT>yYS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9Z6;J%cu^&S~5kUgL{ zds|{E&|bAkn~a?2zmkQ$;Rc!?XTOF);P3*y@AcQ5bdlYlzK3CQ3LN-)&ZDen5z8^c zpm5!DUv+cQw@T9zD9!mght$B*8*(Z0&!6Bf>O5=qmewTc^Iqw=08>sCjFebNY0cA| z=<*26j;2@oOt7kRlRVW>V>tQ;>rww4dY%>rNu4@n7u>2lX;;@ml8cBtFJD}G0!G#j zFSQ;c2X+&@X_lnT(l}0PTK3lUM8hRg@Vu+a# z$7^1G7FmqdikHzZi_V=d+c0`p4U(VI?x-tR`$w%!E@bYImEyPrcBH~^)+x8>{}>{p_Jr?^`@g}7@{i&E SbXF{C089qk^V*uAl)nITL&=x` literal 0 HcmV?d00001 diff --git a/packaging/snap/local/adguard-home-web.sh b/packaging/snap/local/adguard-home-web.sh new file mode 100755 index 00000000..9e75aa2e --- /dev/null +++ b/packaging/snap/local/adguard-home-web.sh @@ -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 + diff --git a/packaging/snap/snapcraft.yaml b/packaging/snap/snapcraft.yaml index 1d6c5274..6cdd811c 100644 --- a/packaging/snap/snapcraft.yaml +++ b/packaging/snap/snapcraft.yaml @@ -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 \ No newline at end of file + restart-condition: always + adguard-home-web: + command: adguard-home-web.sh + plugs: [desktop] \ No newline at end of file diff --git a/snap/gui/adguard-home-web.desktop b/snap/gui/adguard-home-web.desktop new file mode 100644 index 00000000..3d68d8b0 --- /dev/null +++ b/snap/gui/adguard-home-web.desktop @@ -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 diff --git a/snap/gui/adguard-home-web.png b/snap/gui/adguard-home-web.png new file mode 100644 index 0000000000000000000000000000000000000000..ce3555c05c3d5059365df1bdfbb988bf81093795 GIT binary patch literal 1594 zcmZWpX;4#V6#ZTT2>~gIvMUm#D5Btl$QIE=B|_9hB?zcgLBs$CQ6b9OJZLPqluZjd zieb|R+!Ym21E>ft5l~zaS%Pdvb|`@?eYDdboz9$l&pr3vGjqQ`-?7bXFMVBeT>yYS z)7#SrWn?CFuxK7@&r+bI#a+!>4ZzI|J!P;qs>vbVJ}dy@7ovMY0H$X4dja6X0Q3g| zKs^J1$$|5gTRhN#|K^Rp43v3QN5U)lVJIs8MP)Si?h)?o*suo&XK?RuSUEr9K0o3C zpL;6~?VOUHZyV~IR4U{X12vs>d`WUc-y4labMsTVur{Npx%6pw>&)H67#}tV5SDKa zOE_8nVR*RxSs~dlQ()GD&Y;~Jygbe1`|qTo0w2RG^jz&5 z`|10+zU)%iP-uOhXYTvtt4cIFdoy_{Q>0bg|8A_R))8*BnR4mkqTh8V&YdG4x;j z16EJB&LD$(wcL-{-DJhyi8~Vl?1c%1f$_q#GO(t=Kwmf)$z|ijMvCa>Ws&JEVMqE9HPIR{Vlu%BroQRK!Lj+e=znddAM)!;3e(iCRK&otLl=IL>iS z$$Myl(1UW+IpDkoQbKZlq6STw@QKj&Dv&mT^FBMgF31AOyqJI$PGk107{td`E0ZAQ zRp|JOalbFQnnA}X4$^PsyHrpeI*3kTBuPyCkvdEksO8`{;tXsF7Wq=;<{6c#CAK z5}6Ae(h2Nu*hJNmJX%!xdU^kW?j0h7r6AJC>4p8XTU9PImGKq5Mn%;fHH-8ir>3xK z6^JCkIU(%pN49Nk$i?N4zQ^ak>zOoWc1%wwIyV$xVg;(}Qy`I2k0gb2+YJA7qW5HI z=$gg0AkvaooKeleluNq7@fwYlrhJ8+ z_Vz7{NuLKe$QMgJx+TP8NW8Uj3DwnqD_rEpLDysX=8$0$J1U=M>ETAF)}-a11~_#P zc+x~)7UphhBufDBkQbJ`Uk|@&2@#35f&x$c5Y)S?P#qY*H~BlE>u{rSh>G>NAQ{^@ z-r?8&F7}dXsK5=3%xa(eIKt;-Hf=uAG^>5uslwuPQCKHrDg_dIb0ZmNq^eylk~X$y z+33IyPdj!Af%i{hqr?-oCPmF=I_i$D8XE~EaoOY?%uuWT`UZz!r0ElHHkjYw@xbP@ zO)f?4&oda=0*^1sdmDHOXxEAwBvQIN<>7BCCS=NEY^*G36k9Z6;J%cu^&S~5kUgL{ zds|{E&|bAkn~a?2zmkQ$;Rc!?XTOF);P3*y@AcQ5bdlYlzK3CQ3LN-)&ZDen5z8^c zpm5!DUv+cQw@T9zD9!mght$B*8*(Z0&!6Bf>O5=qmewTc^Iqw=08>sCjFebNY0cA| z=<*26j;2@oOt7kRlRVW>V>tQ;>rww4dY%>rNu4@n7u>2lX;;@ml8cBtFJD}G0!G#j zFSQ;c2X+&@X_lnT(l}0PTK3lUM8hRg@Vu+a# z$7^1G7FmqdikHzZi_V=d+c0`p4U(VI?x-tR`$w%!E@bYImEyPrcBH~^)+x8>{}>{p_Jr?^`@g}7@{i&E SbXF{C089qk^V*uAl)nITL&=x` literal 0 HcmV?d00001 diff --git a/snap/local/adguard-home-web.sh b/snap/local/adguard-home-web.sh new file mode 100755 index 00000000..9e75aa2e --- /dev/null +++ b/snap/local/adguard-home-web.sh @@ -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 + diff --git a/snapcraft.yaml b/snap/snapcraft.yaml similarity index 90% rename from snapcraft.yaml rename to snap/snapcraft.yaml index c5cda82b..6e5c4652 100644 --- a/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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] From 5e0fe8ba3f90757691550f4579471ddb872dc0aa Mon Sep 17 00:00:00 2001 From: Alan Pope Date: Fri, 26 Jun 2020 12:33:15 +0100 Subject: [PATCH 2/3] Update adguard-home-web.sh Add missing space --- packaging/snap/local/adguard-home-web.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/snap/local/adguard-home-web.sh b/packaging/snap/local/adguard-home-web.sh index 9e75aa2e..262025df 100755 --- a/packaging/snap/local/adguard-home-web.sh +++ b/packaging/snap/local/adguard-home-web.sh @@ -2,7 +2,7 @@ # Get admin tool port from configuration bind_port=$(grep bind_port $SNAP_DATA/AdGuardHome.yaml | awk -F ' ' '{print $2}') -if [ -z "$bind_port"]; then +if [ -z "$bind_port" ]; then xdg-open http://localhost:3000 else xdg-open http://localhost:$bind_port From 0297c1291147b864e2399894bdb6b1c641a662af Mon Sep 17 00:00:00 2001 From: Alan Pope Date: Fri, 26 Jun 2020 12:33:37 +0100 Subject: [PATCH 3/3] Update adguard-home-web.sh --- snap/local/adguard-home-web.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/local/adguard-home-web.sh b/snap/local/adguard-home-web.sh index 9e75aa2e..262025df 100755 --- a/snap/local/adguard-home-web.sh +++ b/snap/local/adguard-home-web.sh @@ -2,7 +2,7 @@ # Get admin tool port from configuration bind_port=$(grep bind_port $SNAP_DATA/AdGuardHome.yaml | awk -F ' ' '{print $2}') -if [ -z "$bind_port"]; then +if [ -z "$bind_port" ]; then xdg-open http://localhost:3000 else xdg-open http://localhost:$bind_port