androidseb25 / iGotify-Notification-Assistent

Docker container for sending Gotify notifications to iOS devices (bridge to gotify websocket)
MIT License
132 stars 6 forks source link

Binary für Linux Installation? #15

Closed nicedevil007 closed 8 months ago

nicedevil007 commented 9 months ago

Hallo, zunächst vielen Dank für diese Lösung!

Ich habe ne Proxmox Umgebung, bei der ich fast alles auf LXC Container aufgebaut habe, machts einfach schöner mit dem Backup und Restore im Falle des Falles. Den Umweg über Docker versuche ich gerade so oft es geht zu umgehen, weshalb ich auch gotify selbst schon in einem Alma Linux laufen habe.

Wäre es möglich ne Binary zur Verfügung zustellen für deinen Dienst die wir dann mit nem Systemd restarten können etc.

Grüße und noch nen gesundes neues :)

androidseb25 commented 9 months ago

Hi ja das wird es mit dem nächsten Großen Release geben da kann sich jeder die Daten ziehen und es sich selber builden (1.1). Nur dauert es noch eine Weile da die Verschlüsselung unter iOS Probleme macht.

nicedevil007 commented 9 months ago

perfekt! freu mich drauf, solange muss der docker herhalten :) der buymekaltesgetränk fehlt hier im github :) habs mal über iphone getan!

mach weiter so

androidseb25 commented 9 months ago

Danke 🙏🏼

Ich geb mir Mühe das ich es schnell hinbekomme

androidseb25 commented 8 months ago

Mit dem nächsten Release bzw. Update von 1.1.0 auf 1.1.x wird es Binaries geben unter Releases. Eine Anleitung wird es dann im Wiki geben

doubleugm commented 8 months ago

Perfekt. Vielen dank !

androidseb25 commented 8 months ago

Binaries sind nun verfügbar!

https://github.com/androidseb25/iGotify-Notification-Assistent/releases

Anleitung findet ihr im Wiki: https://github.com/androidseb25/iGotify-Notification-Assistent/wiki/Installation-%E2%80%90-Service

androidseb25 commented 8 months ago

Bitte gebt mir mal bescheid ob es funktioniert hat.

nicedevil007 commented 8 months ago

Heute eher Feierabend, teste nachher im LXC 😎

androidseb25 commented 8 months ago

Heute eher Feierabend, teste nachher im LXC 😎

ok vllt behebt eine neuinstallation des iGotify Assistenten ja das problem im anderen Issue

nicedevil007 commented 8 months ago

haste mir nen tipp wie ich deine 4 arguments mit dem CLI befehl reingeben könnte? also mal beispiel, was ich getestet habe und net klappt:

/root/.dotnet/dotnet '/opt/iGotify/iGotify Notification Assist.dll' --property:IGOTIFY_CLIENT_TOKEN=TOKEN_CLIENT_GOTIFY --property:GOTIFY_SERVER_URL="https://URL_DES_GOTIFY_SERVERS" --property:ASPNETCORE_URLS="http://0.0.0.0
:8681" --property:ASPNETCORE_ENVIRONMENT=Production

zur erklärung, baus gerade mit Alpine Linux und das hat kein systemd sondern openrc-run. Meine aktuell run file schaut noch so aus und tüftel da gerade:

#!/sbin/openrc-run

export IGOTIFY_CLIENT_TOKEN=TOKEN_CLIENT_GOTIFY
export GOTIFY_SERVER_URL="https://URL_DES_GOTIFY_SERVERS"
export ASPNETCORE_URLS="http://0.0.0.0:8681"
export ASPNETCORE_ENVIRONMENT=Production

depend() {
   after logger
}

start() {
   ebegin "Start iGotify daemon"
   /root/.dotnet/dotnet '/opt/iGotify/iGotify Notification Assist.dll'
   eend $?
}

stop() {
   ebegin "Stop iGotify daemon"
   /usr/bin/killall /root/.dotnet/dotnet
   eend $?
}

Für Alpine müssen 2 Pakete noch installiert werden:

apk add libstdc++ libicu
androidseb25 commented 8 months ago

Versuche mal fogendes, sitze gerade nicht am PC um es zu testen.

IGOTIFY_CLIENT_TOKEN=TOKEN_CLIENT_GOTIFY GOTIFY_SERVER_URL="https://URL_DES_GOTIFY_SERVERS" ASPNETCORE_URLS="http://0.0.0.0:8681" ASPNETCORE_ENVIRONMENT=Production /root/.dotnet/dotnet '/opt/iGotify/iGotify Notification Assist.dll'

nicedevil007 commented 8 months ago

Versuche mal fogendes, sitze gerade nicht am PC um es zu testen.

IGOTIFY_CLIENT_TOKEN=TOKEN_CLIENT_GOTIFY GOTIFY_SERVER_URL="https://URL_DES_GOTIFY_SERVERS" ASPNETCORE_URLS="http://0.0.0.0:8681" ASPNETCORE_ENVIRONMENT=Production /root/.dotnet/dotnet '/opt/iGotify/iGotify Notification Assist.dll'

export habsch noch vor die variablen gemacht :)

igotify:/opt/iGotify# export ASPNETCORE_ENVIRONMENT=Production
igotify:/opt/iGotify# /root/.dotnet/dotnet '/opt/iGotify/iGotify Notification Assist.dll'
File is created.
Client - Token: #############
Gotify - Url: wss://#############/stream?token=#############
SecNtfy Server - Url: https://api.secntfy.app/api
Client connecting...Done!
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://0.0.0.0:8681
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /opt/iGotify

soooo jetzt nur noch den openrc-run hinkriegen, dann habsch auch nen kompletten guide für dich für alpine :) achja und testen obs geht hahahhaha

androidseb25 commented 8 months ago

Ahh ok gut Wäre cool fürs Wiki nen alpine Guide :D

nicedevil007 commented 8 months ago

Ahh ok gut Wäre cool fürs Wiki nen alpine Guide :D

also Test obs geht mit meinem temporären command zum laufen lassen geht mal ich hab dein Repo gerade geforked aber das wiki is da ja net dabei, wie konnte man das denn nochmal contributen?

androidseb25 commented 8 months ago

Du kannst dann testen über den neuen API Entry Point wo Test/devicetoken steht

nicedevil007 commented 8 months ago

Du kannst dann testen über den neuen API Entry Point wo Test/devicetoken steht

wie gesagt gehen tuts schon ;) hab proxmox als test mal missbraucht, kam instant aufn handy an

androidseb25 commented 8 months ago

Wiki geht glaub ich nicht schreib es einfach hier ins rein in den issue

androidseb25 commented 8 months ago

Schau mal jetzt ob du das Wiki bearbeiten kannst

nicedevil007 commented 8 months ago

Vielleicht hat hier ja wer ne Ahnung wie das mit openrc-run funktioniert, ich bekomme durchgehend den service: Exec format error

#!/sbin/openrc-run
export IGOTIFY_CLIENT_TOKEN=#############
export GOTIFY_SERVER_URL="https://#############"
export ASPNETCORE_URLS="http://0.0.0.0:8681"
export ASPNETCORE_ENVIRONMENT=Production

name="iGotify Notification Service"
description=""
command="/root/.dotnet/dotnet"
command_args="/opt/iGotify/iGotify Notification Assist.dll"
command_user="root:root"

@wiki => jo das geht jetzt :) wills aber erst alles reinhauen, wenns dann noch mit dem openrc-run gefixed is

androidseb25 commented 8 months ago

Hast du auch die richtige Plattform genommen?

Den Fehler kenn ich nur wenn man die falsche Plattform nutzt, also arm64 statt amd64

nicedevil007 commented 8 months ago

jo hab ich ;) weil den command so in der shell absenden geht halt einfach schon (test von oben war damit)

androidseb25 commented 8 months ago

Mmmmh ich schau es mir dann mal an wen. Ich wieder zuhause bin

Was für eine alpine linux Version nutzt du?

nicedevil007 commented 8 months ago
igotify:~# cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.19.0
PRETTY_NAME="Alpine Linux v3.19"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

habs mit edge und latest-stable probiert

androidseb25 commented 8 months ago

Und Architektur x86_64?

nicedevil007 commented 8 months ago
igotify:~# uname -a
Linux igotify 6.5.11-7-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-7 (2023-12-05T09:44Z) x86_64 Linux
nicedevil007 commented 8 months ago

vergiss einfach alles... layer8... wenn über der ersten zeile ne leerzeile ist... ich baus noch fertig das wir auch stoppen können, rest folgt :)

nicedevil007 commented 8 months ago

dein wiki kann man direkt editieren ohne das du es wie art pullrequest drüber schaust?

würde es bissl umbauen wenn das ok ist, worst case stellst alten commit her? also brauchen ja jetzt unterscheidung zwischen systemd install und nen alpine linux bzw. openrc-run

anstatt überschriften würde ich das mit kommentaren in einem script reinknallen

also anstatt so:

  1. Download and install dotnet on your system
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 8.0
  1. Add dotnet to $PATH
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc
source ~/.bashrc

würde ich machen so:

# Download and install dotnet on your system
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 8.0

# Add dotnet to `$PATH`
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc
source ~/.bashrc

vorteil man kann am ende den ganzen block kopieren :)

androidseb25 commented 8 months ago

Nein lass das mal so erstmal ich muss auch erstmal mit Wiki's schreiben auseinandersetzen

Erstell einfach ne neue Seite

nicedevil007 commented 8 months ago

Nein lass das mal so erstmal ich muss auch erstmal mit Wiki's schreiben auseinandersetzen

Erstell einfach ne neue Seite

alles klar, ich bau dir ne neue und du kannst dann übernehmen was du brauchst :)

nicedevil007 commented 8 months ago

schaus dir mal an, denke habe fertig und läuft ja hier jetzt auch können wir also das feature request closen

androidseb25 commented 8 months ago

ok sieht gut aus werde das mir die tage nochmal in ruhe durchlesen und werde jetzt wieder den haken bei wiki read only reinpacken für das projekt, falls was ist dann schick es mir einfach hierrein oder per mail :)

androidseb25 commented 8 months ago

Hallo Leute mir ist ein Fehler unterlaufen im Wiki, eure Binaries sind veraltet und von der Falschen Seite (Testrepo) gekommen.

Bitte ladet euch die neuen Binaries unter der neuen url herunter, diese findet ihr im aktualisiertem Wiki.

Sorry nochmal zu dem missgeschickt