Template config file is copied as maxscale.cnf if no configuration file is found.
If /etc/maxscale.cnf is not found, the /etc/maxscale.cnf.template will be copied as /etc/maxscale.cnf.
This allows MaxScale to start right after installation if combined with a running and properly configured server.
This commit is contained in:
Markus Makela 2015-10-26 22:13:33 +02:00
parent ee29e85016
commit bed6666338

View File

@ -46,6 +46,13 @@ then
cp @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale.service /usr/lib/systemd/system
systemctl daemon-reload
fi
# If no maxscale.cnf file is found in /etc, copy the template file there
if [ ! -f "@MAXSCALE_CONFDIR@/maxscale.cnf" ]
then
cp -n @MAXSCALE_CONFDIR@/maxscale.cnf.template @MAXSCALE_CONFDIR@/maxscale.cnf
fi
/sbin/ldconfig
cat <<EOF >& 2