Files
EagleCast/eaglecast-simple.service
T
h202-wq 66d9a033c9
publish-github-pages / deploy (push) Has been cancelled
EagleCast
2026-07-09 10:03:32 -04:00

61 lines
2.5 KiB
Desktop File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# A simpler version of the service template with wider compatibility for older OS's
[Unit]
Description=eaglecast email service
ConditionPathExists=/etc/eaglecast/config.toml
Wants=network.target
# The PostgreSQL database may not be on the same host but if it
# is eaglecast should wait for it to start up.
After=postgresql.service
[Service]
Type=simple
PermissionsStartOnly=true
WorkingDirectory=/usr/bin
ExecStartPre=/usr/bin/mkdir -p "/etc/eaglecast/uploads"
ExecStartPre=/usr/bin/eaglecast --config /etc/eaglecast/config.toml --upgrade --yes
ExecStart=/usr/bin/eaglecast --config /etc/eaglecast/config.toml
TimeoutStopSec=10
Restart=on-failure
RestartSec=5
# To enable a static dir, add the following
# --static-dir /etc/eaglecast/static
# to the end of the ExecStart line above after creating the dir and fetching the files with:
# mkdir -p /etc/eaglecast/static ; wget -O - https://source.offmarket.win/aleagle/EagleCast/archive/master.tar.gz | tar xz -C /etc/eaglecast/static --strip=2 "eaglecast/static"
# To enable a log file that persists after restarts, replace the ExecStart= line with:
# ExecStart=/bin/bash -ce "exec /usr/bin/eaglecast --config /etc/eaglecast/config.toml --static-dir /etc/eaglecast/static >>/etc/eaglecast.log 2>&1"
# Set user to run eaglecast service as (instead of root).
# Can use "DynamicUser=" instead, if your systemd version is >= 232.
# https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#DynamicUser=
#User=
#StateDirectory=/etc/eaglecast
#Environment=HOME=/usr/bin
# Use systemds ability to disable security-sensitive features
# that eaglecast does not explicitly need.
# NoNewPrivileges should be enabled by DynamicUser=yes but systemd-analyze
# still recommended to explicitly enable it.
NoNewPrivileges=True
# eaglecast doesnt need any capabilities as defined by the linux kernel
# see: https://man7.org/linux/man-pages/man7/capabilities.7.html
CapabilityBoundingSet=
# eaglecast only executes native code with no need for any other ABIs.
SystemCallArchitectures=native
# Make /home/, /root/, and /run/user/ inaccessible.
# ProtectSystem=strict and ProtectHome=read-only are implied by DynamicUser=True
# If you set ExecStartPre=/usr/bin/mkdir -p "eaglecast/uploads" to a directory in /home/ or /root/ it will cause uploads to fail
ProtectHome=True
# Make sure files created by eaglecast are only readable by itself and
# others in the eaglecast system group.
UMask=0027
# eaglecast only needs to support the IPv4 and IPv6 address families.
RestrictAddressFamilies=AF_INET AF_INET6
[Install]
WantedBy=multi-user.target