MaxScale/etc/maxscale.service.in
Markus Makela 282ed9f8c2 Start MaxScale as the maxscale user with systemd
Systemd allows MaxScale to start as the 'maxscale' user and it should be
done to completely prevent root access for the maxscale process.
2016-10-29 11:03:15 +03:00

25 lines
518 B
SYSTEMD

[Unit]
Description=MariaDB MaxScale Database Proxy
After=network.target
[Service]
Type=forking
Restart=on-abort
# Make sure /var/run/maxscale exists
PermissionsStartOnly=true
ExecStartPre=/usr/bin/install -d @MAXSCALE_VARDIR@/run/maxscale -o maxscale -g maxscale
PIDFile=@MAXSCALE_VARDIR@/run/maxscale/maxscale.pid
# Use the default user and group
User=maxscale
Group=maxscale
ExecStart=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale
TimeoutStartSec=120
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target