
Systemd provides the facilities to run commands before startup which can be used to prevent the problem that fixing MXS-2578 caused: upon upgrading from 2.3.8 to 2.3.9 the /var/lib/maxscale directory would be removed if it was empty.
33 lines
793 B
SYSTEMD
33 lines
793 B
SYSTEMD
[Unit]
|
|
Description=MariaDB MaxScale Database Proxy
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=forking
|
|
Restart=on-abort
|
|
@SERVICE_FILE_DEBUG_OPTIONS@
|
|
|
|
# Make sure /var/run/maxscale exists
|
|
PermissionsStartOnly=true
|
|
ExecStartPre=/usr/bin/install -d @MAXSCALE_VARDIR@/run/maxscale -o maxscale -g maxscale
|
|
ExecStartPre=/usr/bin/install -d @MAXSCALE_VARDIR@/lib/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
|
|
StartLimitBurst=0
|
|
WatchdogSec=60s
|
|
NotifyAccess=all
|
|
|
|
# Only relevant when MaxScale is linked with -fsanitize=address
|
|
Environment=ASAN_OPTIONS=abort_on_error=1
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|