31 lines
672 B
SYSTEMD
31 lines
672 B
SYSTEMD
[Unit]
|
|
Description = Go language server.
|
|
|
|
[Service]
|
|
ExecStartPre=bash -c "rm -v -f /tmp/.gopls-daemon.sock || true"
|
|
ExecStart=%h/go/bin/gopls -listen="unix;/tmp/.gopls-daemon.sock"
|
|
ExecStopPost=bash -c "rm -v -f /tmp/.gopls-daemon.sock || true"
|
|
; -remote.listen.timeout
|
|
Restart=on-failure
|
|
RestartSec=1m
|
|
|
|
SystemCallFilter=~@reboot @obsolete
|
|
|
|
ProtectProc=invisible
|
|
ProcSubset=pid
|
|
ProtectHome=true
|
|
|
|
RestrictNamespaces=true
|
|
|
|
NoNewPrivileges=yes
|
|
ProtectSystem=strict
|
|
DevicePolicy=closed
|
|
LockPersonality=true
|
|
MemoryDenyWriteExecute=true
|
|
RestrictAddressFamilies=AF_UNIX
|
|
RestrictRealtime=true
|
|
RestrictSUIDSGID=true
|
|
SystemCallArchitectures=native
|
|
|
|
[Install]
|
|
WantedBy=default.target |