mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 20:40:38 +00:00
Sandbox signal-cli-socket service using systemd features
This commit is contained in:
parent
d00674221f
commit
594fc1ac74
1 changed files with 30 additions and 3 deletions
|
@ -5,15 +5,42 @@ After=network-online.target
|
|||
Requires=signal-cli-socket.socket
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
CapabilityBoundingSet=
|
||||
Environment="SIGNAL_CLI_OPTS=-Xms2m"
|
||||
ExecStart=%dir%/bin/signal-cli --config /var/lib/signal-cli daemon
|
||||
User=signal-cli
|
||||
# Update 'ReadWritePaths' if you change the config path here
|
||||
ExecStart=/usr/local/bin/signal-cli --config /var/lib/signal-cli daemon
|
||||
LockPersonality=true
|
||||
NoNewPrivileges=true
|
||||
PrivateDevices=true
|
||||
PrivateIPC=true
|
||||
PrivateTmp=true
|
||||
PrivateUsers=true
|
||||
ProcSubset=pid
|
||||
ProtectClock=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectProc=invisible
|
||||
ProtectSystem=strict
|
||||
# Profile pictures and attachments to upload must be located here for the service to access them
|
||||
ReadWritePaths=/var/lib/signal-cli
|
||||
RestrictAddressFamilies=AF_INET AF_INET6
|
||||
RestrictNamespaces=true
|
||||
RestrictRealtime=true
|
||||
RestrictSUIDSGID=true
|
||||
# JVM always exits with 143 in reaction to SIGTERM signal
|
||||
SuccessExitStatus=143
|
||||
StandardInput=socket
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=~@debug @mount @obsolete @privileged @resources
|
||||
UMask=0077
|
||||
# Create the user and home directory with 'useradd -r -U -s /usr/sbin/nologin -m -b /var/lib signal-cli'
|
||||
User=signal-cli
|
||||
|
||||
[Install]
|
||||
Also=signal-cli-socket.socket
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue