Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing launcher twice #139

Closed
LeilaZarban opened this issue Dec 18, 2023 · 1 comment · Fixed by #154
Closed

Error installing launcher twice #139

LeilaZarban opened this issue Dec 18, 2023 · 1 comment · Fixed by #154
Assignees
Labels
bug Something isn't working os-linux

Comments

@LeilaZarban
Copy link
Contributor

LeilaZarban commented Dec 18, 2023

Background

When a user on linux installs the launcher 2 times (sudo ./fiskaltrust.Launcher install), they get the following error.

Image

Problem

When writing to the systemd unit file /etc/systemd/system/*.service we append. This leads to the file being invalid.

Solution

We should not append to the systemd unit file but overwrite it.

Before installing the launcher service we should check if the launcher is already installed (by checking if the file exists and by using systemd) and fail the installation in this case with nice error messages (in the error message we can tell them to run the uninstall command, if that actually solves the problem).

In the uninstall command we should make sure that we actually remove the file and that that is enough to really remove the service from systemd.

@volllly volllly changed the title User get Error when they run middleware as a service and service is already run Error installing launcher twice Dec 18, 2023
@volllly volllly added os-linux bug Something isn't working labels Dec 18, 2023
@forsthug forsthug self-assigned this Dec 21, 2023
@forsthug
Copy link
Contributor

The systemd service is never fully running at the moment, it suddenly stops. It seems the lifetime solution is not working. Maybe we should consider this implementation https://devblogs.microsoft.com/dotnet/net-core-and-systemd/

@volllly volllly linked a pull request Jan 3, 2024 that will close this issue
4 tasks
volllly added a commit that referenced this issue Jan 22, 2024
…kaltrust/middleware-launcher into #139-Error-installing-launcher-twice
@forsthug forsthug assigned volllly and unassigned forsthug Jan 25, 2024
@volllly volllly linked a pull request Jan 25, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment