MXS-1285: Check that upstart config exists before copying it

The existence of the file should be checked before it is copied. Otherwise
the installation will produce errors.
This commit is contained in:
Markus Mäkelä
2017-07-25 10:32:50 +03:00
parent ed44c45be1
commit f16e93c112

View File

@ -53,7 +53,7 @@ then
systemctl daemon-reload
fi
else
if [ -d "/etc/init/" ]
if [ -d "/etc/init/" ] && [ -f "@CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/upstart/maxscale.conf" ]
then
cp @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/upstart/maxscale.conf /etc/init/
fi