Skip to content

Instantly share code, notes, and snippets.

@adowning
Forked from mithereal/tile38.service
Created December 15, 2019 15:08
Show Gist options
  • Select an option

  • Save adowning/00cd78134f86a7013b2c3484e41714dc to your computer and use it in GitHub Desktop.

Select an option

Save adowning/00cd78134f86a7013b2c3484e41714dc to your computer and use it in GitHub Desktop.
tile38 systemd script
[Unit]
Description=Advanced Geolocation store
After=network.target
Documentation=http://tile38.com/documentation/, man:redis-server(1)
[Service]
Type=forking
ExecStart=/srv/geodb/tile38-server
PIDFile=/var/run/tile38/tile38-server.pid
TimeoutStopSec=0
Restart=always
User=tile38
Group=tile38
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=yes
PrivateDevices=yes
ProtectHome=yes
ReadOnlyDirectories=/
ReadWriteDirectories=-/var/lib/tile38
ReadWriteDirectories=-/var/log/tile38
ReadWriteDirectories=-/var/run/tile38
CapabilityBoundingSet=~CAP_SYS_PTRACE
# redis-server writes its own config file when in cluster mode so we allow
# writing there (NB. ProtectSystem=true over ProtectSystem=full)
ProtectSystem=true
ReadWriteDirectories=-/etc/tile38
[Install]
WantedBy=multi-user.target
Alias=tile38.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment