-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update [email protected] #1614
base: master
Are you sure you want to change the base?
Update [email protected] #1614
Conversation
Your commit breaks the service template unit. That |
Are you talking about I didn't try without changing those lines since that person had an issue + the guide says to change them, but it worked according to the guide, so that's why I suggested changing it. |
Yes the guide you’ve linked to recommends changing some lines and in doing so breaks a very useful feature of the systemd unit: the ability to run more than one instance of listmonk with different configurations but the same service unit. The lines you’ve removed (and replaced) in your PR are implementing a behavior that is intentional. If there is a bug in the implementation I’m all for fixing that. But you’ve changed the entire nature of the unit. |
Good to know. I tagged you in the issue because I assumed you know more about this than me. So please feel free to make specific suggestions/changes. |
Apparently my listmonk service stopped on its own:
Is it possible to send an email notification when that happens? I know my CSF firewall is able to email me about events. I modified these lines to try to fix the issue:
I'm not sure whether to comment out these lines:
Or change them to:
I was thinking to simplify it the same way bamboowonder did, but that guide doesn't cover creating a new user for However, as noted here #843 (comment) another way to "fix this" is by running Oh, I think it didn't restart after the server rebooted. So this needs to be changed too: Summary:This file needs major changes to be more compatible. I suggested in the issue-thread that we could have two versions or two sets of commands in the same file with one set commented out by default. Perhaps we could leave the current file mostly the same (and/or rename it to
Maybe And still missing is a static directory. https://listmonk.app/docs/templating/#system-templates EDIT:Changing
But if I restart the listmonk service it works:
I removed that line and it still failed to start after rebooting the server:
I added these lines from one of the guides:
And put it back to |
Fix for not restarting after rebooting server.
* Added static dir (please correct if it's wrong) * Reversed changes that break the ability to run more than one instance of listmonk with different configurations but the same service unit
@kmohrf does everything look good now with this service and the new simple.service? The only thing I'm not sure about is the Also, I understand that
|
Logs:I'm not sure which is best, but when reviewing https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html I saw these options and added them commented out in the simple.service https://github.com/knadh/listmonk/blob/master/listmonk-simple.service file:
I assume that listmonk doesn't use a cache, so I can probably remove that? I don't know how to get listmonk to save logs with that though, and this (alternative?) may be the easiest/best way (which is working for me):
So I added it as an option. I'm not sure if it conflicts with anything else. There are other ways to do it, but they vary based on systemd version #1462 (comment). |
I switched to AlmaLinux 9 and added back many of the commands I previously removed due to them causing error messages because of an old systemd version.
Running these consecutively:
Still results in:
Not sure if that's the expected result though. Line 54 is this:
|
I fixed this in the deb-package I maintain, but forgot to add a PR here. |
Fix DeviceAllow=False error.
EnvironmentFile=-/etc/default/listmonk | ||
EnvironmentFile=-/etc/default/listmonk-%i | ||
ExecStartPre=/usr/bin/mkdir -p "${HOME}/uploads" | ||
ExecStartPre=/usr/bin/mkdir -p "/etc/listmonk/uploads" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't default to /etc/listmonk
as a) the app should be run as a non-root user and hence, permission to write to /etc/ is unlikely b) arbitrary user files/content should not go in /etc/*
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where should they go, given that ${HOME}
is incompatible with ProtectHome=True
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a bit of Googling and looks like BindPaths, ReadWritePaths
are the way to go. I am not familiar with it, so will have to experiment.
This PR has been marked 'stale' after 90 days of inactivity. If there is no further activity, it will be closed in 7 days. |
#843 (comment)