Update init examples
This commit is contained in:
@@ -1,22 +1,33 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=odidere
|
Description=odidere
|
||||||
After=network.target whisper.service kokoro.service
|
After=network.target
|
||||||
Requires=whisper.service kokoro.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=%i
|
User=%i
|
||||||
ExecStart=/usr/local/bin/odidere -c /etc/odidere/config.yaml
|
ExecStart=/usr/local/bin/odidere -c /etc/odidere/config.yaml
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=10
|
|
||||||
|
|
||||||
ProtectSystem=full
|
# Makes /usr, /boot, /efi, and /etc read-only for the service and its tools.
|
||||||
PrivateTmp=true
|
# ProtectSystem=full
|
||||||
SystemCallArchitectures=native
|
|
||||||
MemoryDenyWriteExecute=true
|
|
||||||
NoNewPrivileges=true
|
|
||||||
|
|
||||||
StartLimitIntervalSec=60
|
# Gives the service and its tools private /tmp and /var/tmp directories.
|
||||||
StartLimitBurst=4
|
# Files in those directories are not shared with other services.
|
||||||
|
# PrivateTmp=true
|
||||||
|
|
||||||
|
# These optional restrictions also apply to tool subprocesses.
|
||||||
|
# https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html
|
||||||
|
|
||||||
|
# Restricts system calls to the native architecture. Tools that execute
|
||||||
|
# binaries for another ABI, such as 32-bit binaries, can fail.
|
||||||
|
# SystemCallArchitectures=native
|
||||||
|
|
||||||
|
# Blocks writable executable memory. Tool runtimes that generate machine
|
||||||
|
# code can fail under this restriction.
|
||||||
|
# MemoryDenyWriteExecute=true
|
||||||
|
|
||||||
|
# Prevents privilege gains through setuid executables or file capabilities.
|
||||||
|
# Tools that rely on those privilege gains can fail.
|
||||||
|
# NoNewPrivileges=true
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=odidere
|
Description=odidere
|
||||||
After=network.target whisper.service kokoro.service
|
After=network.target
|
||||||
Requires=whisper.service kokoro.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=%h/.local/bin/odidere -c %h/.config/odidere/config.yaml
|
ExecStart=%h/.local/bin/odidere -c %h/.config/odidere/config.yaml
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=10
|
|
||||||
|
|
||||||
SystemCallArchitectures=native
|
# These optional restrictions also apply to tool subprocesses.
|
||||||
MemoryDenyWriteExecute=true
|
# https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html
|
||||||
NoNewPrivileges=true
|
|
||||||
|
|
||||||
StartLimitIntervalSec=60
|
# Restricts system calls to the native architecture. Tools that execute
|
||||||
StartLimitBurst=4
|
# binaries for another ABI, such as 32-bit binaries, can fail.
|
||||||
|
# SystemCallArchitectures=native
|
||||||
|
|
||||||
|
# Blocks writable executable memory. Tool runtimes that generate machine
|
||||||
|
# code can fail under this restriction.
|
||||||
|
# MemoryDenyWriteExecute=true
|
||||||
|
|
||||||
|
# Prevents privilege gains through setuid executables or file capabilities.
|
||||||
|
# Tools that rely on those privilege gains can fail.
|
||||||
|
# NoNewPrivileges=true
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
|
|||||||
Reference in New Issue
Block a user