MXS-2777: Fix installation directory
The drop-in directory must be created in /etc.
This commit is contained in:
@ -46,15 +46,23 @@ then
|
|||||||
if [ -d "/lib/systemd/system" ]
|
if [ -d "/lib/systemd/system" ]
|
||||||
then
|
then
|
||||||
cp @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.service /lib/systemd/system
|
cp @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.service /lib/systemd/system
|
||||||
mkdir -p /lib/systemd/system/maxscale.service.d
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
elif [ -d "/usr/lib/systemd/system" ]
|
elif [ -d "/usr/lib/systemd/system" ]
|
||||||
then
|
then
|
||||||
cp @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.service /usr/lib/systemd/system
|
cp @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.service /usr/lib/systemd/system
|
||||||
mkdir -p /usr/lib/systemd/system/maxscale.service.d
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
fi
|
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
|
systemctl enable maxscale.service
|
||||||
else
|
else
|
||||||
if [ -d "/etc/init/" ] && [ -f "@CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/upstart/maxscale.conf" ]
|
if [ -d "/etc/init/" ] && [ -f "@CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/upstart/maxscale.conf" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user