MXS-2777: Fix installation directory

The drop-in directory must be created in /etc.
This commit is contained in:
Markus Mäkelä
2020-02-05 15:31:17 +02:00
parent c0e20137ee
commit 21989f7a16

View File

@ -46,15 +46,23 @@ then
if [ -d "/lib/systemd/system" ]
then
cp @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.service /lib/systemd/system
mkdir -p /lib/systemd/system/maxscale.service.d
systemctl daemon-reload
elif [ -d "/usr/lib/systemd/system" ]
then
cp @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.service /usr/lib/systemd/system
mkdir -p /usr/lib/systemd/system/maxscale.service.d
systemctl daemon-reload
fi
# Remove old directories, mistakenly installed by a few versions
if [ -d /lib/systemd/system/maxscale.service.d ]
then
rmdir /lib/systemd/system/maxscale.service.d
elif [ -d /usr/lib/systemd/system/maxscale.service.d ]
then
rmdir /lib/systemd/system/maxscale.service.d
fi
mkdir -p /etc/systemd/system/maxscale.service.d
systemctl enable maxscale.service
else
if [ -d "/etc/init/" ] && [ -f "@CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/upstart/maxscale.conf" ]