Compare commits

...

10 commits

Author SHA1 Message Date
MaximilianKohler 6ce70fd279
Merge e352e0d4d6 into 550cd3e1f8 2024-09-09 22:27:09 -04:00
Bishop Clark 550cd3e1f8
Update README.md (#2034)
'software', when used as a noun, is not a 'countable' type, and it does not get an article like 'a'.  It's like 'traffic'.
2024-09-06 15:49:53 +05:30
Ken Powers 06e49831dd
Fix tag queyr param in lists.md (#2033) 2024-09-05 09:06:13 +05:30
MaximilianKohler e352e0d4d6
Update listmonk@.service
Fix DeviceAllow=False error.
2024-07-07 05:11:41 -07:00
MaximilianKohler fdb3180e56
add optional log file 2023-12-24 04:15:32 -08:00
MaximilianKohler 504813acf3
change fetch static files cmd 2023-12-11 17:57:49 -08:00
MaximilianKohler d031970bbd
fix static dir 2023-12-11 03:50:20 -08:00
MaximilianKohler 8d75d54246
Update listmonk@.service - reverse some changes and add static dir
* 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
2023-12-11 02:59:18 -08:00
MaximilianKohler efb07ac781
Update listmonk@.service
Fix for not restarting after rebooting server.
2023-12-10 22:24:22 -08:00
MaximilianKohler 9e9b2078ec
Update listmonk@.service
https://github.com/knadh/listmonk/issues/843#issuecomment-1836783468
2023-12-02 17:59:00 -08:00
3 changed files with 27 additions and 6 deletions

View file

@ -48,7 +48,7 @@ __________________
## Developers
listmonk is a free and open source software licensed under AGPLv3. If you are interested in contributing, refer to the [developer setup](https://listmonk.app/docs/developer-setup). The backend is written in Go and the frontend is Vue with Buefy for UI.
listmonk is free and open source software licensed under AGPLv3. If you are interested in contributing, refer to the [developer setup](https://listmonk.app/docs/developer-setup). The backend is written in Go and the frontend is Vue with Buefy for UI.
## License

View file

@ -21,7 +21,7 @@ Retrieve lists.
|:---------|:---------|:---------|:-----------------------------------------------------------------|
| query | string | | string for list name search. |
| status | []string | | Status to filter lists. Repeat in the query for multiple values. |
| tags | []string | | Tags to filter lists. Repeat in the query for multiple values. |
| tag | []string | | Tags to filter lists. Repeat in the query for multiple values. |
| order_by | string | | Sort field. Options: name, status, created_at, updated_at. |
| order | string | | Sorting order. Options: ASC, DESC. |
| page | number | | Page number for pagination. |

View file

@ -1,3 +1,6 @@
# This service template is designed to have the ability to run more than one instance of listmonk with different configurations but the same service unit.
# It may not work with older OS's with older systemd versions.
[Unit]
Description=listmonk mailing list and newsletter manager (%I)
ConditionPathExists=/etc/listmonk/%i.toml
@ -8,12 +11,23 @@ After=postgresql.service
[Service]
Type=simple
PermissionsStartOnly=true
EnvironmentFile=-/etc/default/listmonk
EnvironmentFile=-/etc/default/listmonk-%i
ExecStartPre=/usr/bin/mkdir -p "${HOME}/uploads"
ExecStartPre=/usr/bin/mkdir -p "/etc/listmonk/uploads"
ExecStartPre=/usr/bin/listmonk --config /etc/listmonk/%i.toml --upgrade --yes
ExecStart=/usr/bin/listmonk --config /etc/listmonk/%i.toml $SYSTEMD_LISTMONK_ARGS
TimeoutStopSec=10
Restart=on-failure
RestartSec=5
# To enable a static dir, add the following
# --static-dir /etc/listmonk/static
# to the end of the ExecStart line above after creating the dir and fetching the files with:
# mkdir -p /etc/listmonk/static ; wget -O - https://github.com/knadh/listmonk/archive/master.tar.gz | tar xz -C /etc/listmonk/static --strip=2 "listmonk-master/static"
# To enable a log file that persists after restarts, replace the ExecStart= line with:
# ExecStart=/bin/bash -ce "exec /usr/bin/listmonk --config /etc/listmonk/config.toml --static-dir /etc/listmonk/static >>/etc/listmonk/listmonk.log 2>&1"
# Create dynamic users for listmonk service instances
# but create a state directory for uploads in /var/lib/private/%i.
@ -32,20 +46,27 @@ NoNewPrivileges=True
CapabilityBoundingSet=
# listmonk only executes native code with no need for any other ABIs.
SystemCallArchitectures=native
# Only enable a reasonable set of system calls.
# see: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#SystemCallFilter=
SystemCallFilter=@system-service
SystemCallFilter=~@privileged
# may give dump error https://mumaritc.hashnode.dev/how-to-install-listmonk-using-binary-on-ubuntu-2204
# SystemCallFilter=@system-service
# SystemCallFilter=~@privileged
# ProtectSystem=strict, which is implied by DynamicUser=True, already disabled write calls
# to the entire filesystem hierarchy, leaving only /dev/, /proc/, and /sys/ writable.
# listmonk doesnt need access to those so might as well disable them.
PrivateDevices=True
ProtectControlGroups=True
ProtectKernelTunables=True
# Make /home/, /root/, and /run/user/ inaccessible.
# If you set ExecStartPre=/usr/bin/mkdir -p "listmonk/uploads" to a directory in /home/ or /root/ it will cause uploads to fail
# See https://github.com/knadh/listmonk/issues/843#issuecomment-1836023524
ProtectHome=True
# listmonk doesnt handle any specific device nodes.
DeviceAllow=False
DevicePolicy=closed
# listmonk doesnt make use of linux namespaces.
RestrictNamespaces=True
# listmonk doesnt need realtime scheduling.