Closed mStirner closed 5 months ago
Golang currently doesn't allow loading the same plugin twice with different names https://github.com/golang/go/issues/47298
Your required functionality could be included as a feature request in the gotify-mqtt project or you could build the plugin with a different package path yourself.
$ git clone https://github.com/tystuyfzand/gotify-mqtt.git
$ cd gotify-mqtt
$ sed -i 's|gotify-mqtt|gotify-mqtt-copy|' go.mod plugin.go
$ make GOTIFY_VERSION="v2.4.0" FILE_SUFFIX="for-gotify-v2.4.0" build-linux-amd64
and then move the build/mqtt-linux-amd64for-gotify-v2.4.0.so
file into your plugin directory.
Have opend a issue on the plugin, but i think this also get ignored like my other question. I think the only solution i have is the one you provided.
But i ran in to the following error while building the plugin:
make GOTIFY_VERSION="v2.4.0" FILE_SUFFIX="for-gotify-v2.4.0" build-linux-amd64
mkdir -p ./build || true
rm ./build/gotify-server-go-version || true
wget -O ./build/gotify-server-go-version https://raw.githubusercontent.com/gotify/server/v2.4.0/GO_VERSION
--2024-01-09 11:34:34-- https://raw.githubusercontent.com/gotify/server/v2.4.0/GO_VERSION
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 185.199.108.133, 185.199.111.133, 185.199.110.133, ...
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 7 [text/plain]
Wird in »./build/gotify-server-go-version« gespeichert.
./build/gotify-server-go-version 100%[================================================================================================================>] 7 --.-KB/s in 0s
2024-01-09 11:34:34 (147 KB/s) - »./build/gotify-server-go-version« gespeichert [7/7]
go install github.com/gotify/plugin-api/cmd/gomod-cap@latest
wget -O ./build/gotify-server.mod https://raw.githubusercontent.com/gotify/server/v2.4.0/go.mod
--2024-01-09 11:34:34-- https://raw.githubusercontent.com/gotify/server/v2.4.0/go.mod
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 185.199.108.133, 185.199.111.133, 185.199.110.133, ...
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 2165 (2,1K) [text/plain]
Wird in »./build/gotify-server.mod« gespeichert.
./build/gotify-server.mod 100%[================================================================================================================>] 2,11K --.-KB/s in 0s
2024-01-09 11:34:34 (16,8 MB/s) - »./build/gotify-server.mod« gespeichert [2165/2165]
gomod-cap -from ./build/gotify-server.mod -to go.mod
make: gomod-cap: Command not found
Makefile:18: recipe for target 'update-go-mod' failed
make: *** [update-go-mod] Error 127
Try running make download-tools
before the other make command.
Unfortunately, same error:
marc@stirner:~/projects/playground/gotify-mqtt$ make download-tools
go install github.com/gotify/plugin-api/cmd/gomod-cap@latest
marc@stirner:~/projects/playground/gotify-mqtt$ make GOTIFY_VERSION="v2.4.0" FILE_SUFFIX="for-gotify-v2.4.0" build-linux-amd64
mkdir -p ./build || true
rm ./build/gotify-server-go-version || true
wget -O ./build/gotify-server-go-version https://raw.githubusercontent.com/gotify/server/v2.4.0/GO_VERSION
--2024-01-09 12:50:20-- https://raw.githubusercontent.com/gotify/server/v2.4.0/GO_VERSION
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 185.199.110.133, 185.199.111.133, 185.199.108.133, ...
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 7 [text/plain]
Wird in »./build/gotify-server-go-version« gespeichert.
./build/gotify-server-go-version 100%[================================================================================================================>] 7 --.-KB/s in 0s
2024-01-09 12:50:20 (273 KB/s) - »./build/gotify-server-go-version« gespeichert [7/7]
go install github.com/gotify/plugin-api/cmd/gomod-cap@latest
wget -O ./build/gotify-server.mod https://raw.githubusercontent.com/gotify/server/v2.4.0/go.mod
--2024-01-09 12:50:20-- https://raw.githubusercontent.com/gotify/server/v2.4.0/go.mod
Auflösen des Hostnamens raw.githubusercontent.com (raw.githubusercontent.com) … 185.199.109.133, 185.199.108.133, 185.199.111.133, ...
Verbindungsaufbau zu raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 2165 (2,1K) [text/plain]
Wird in »./build/gotify-server.mod« gespeichert.
./build/gotify-server.mod 100%[================================================================================================================>] 2,11K --.-KB/s in 0s
2024-01-09 12:50:20 (11,3 MB/s) - »./build/gotify-server.mod« gespeichert [2165/2165]
gomod-cap -from ./build/gotify-server.mod -to go.mod
make: gomod-cap: Command not found
Makefile:18: recipe for target 'update-go-mod' failed
make: *** [update-go-mod] Error 127
make download-tools
installs a go binary in $HOME/go/bin
, you need to have this directory on your $PATH
.
Have you read the documentation?
You are setting up gotify in
Describe your problem I have the need to run a plugin multiple times. Simply copying the file multiple times to ´/app/data/plugins/´ does not work and let the container crash.
I want to subscribe to multiple mqtt topics (https://github.com/tystuyfzand/gotify-mqtt), where each topic should be his own gotify application.
Any errors, logs, or other information that might help us identify your problem
Ex:
docker-compose.yml
,nginx.conf
, android logcat, browser requests, etc.docker logs output