Fix to MXS-302: https://mariadb.atlassian.net/browse/MXS-302
Added support for additional command line parameters via sysconfig files.
This commit is contained in:
@ -46,6 +46,9 @@ _RETVAL_STATUS_NOT_RUNNING=3
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
# Source additional command line arguments.
|
||||
[ -f /etc/sysconfig/maxscale ] && . /etc/sysconfig/maxscale
|
||||
|
||||
# we can rearrange this easily
|
||||
processname=maxscale
|
||||
servicename=maxscale
|
||||
@ -87,7 +90,7 @@ start() {
|
||||
chmod 0755 @MAXSCALE_VARDIR@/cache/maxscale
|
||||
chmod 0755 @MAXSCALE_VARDIR@/run/maxscale
|
||||
|
||||
daemon --pidfile $MAXSCALE_PIDFILE @CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale --user=maxscale >& /dev/null
|
||||
daemon --pidfile $MAXSCALE_PIDFILE @CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale --user=maxscale $MAXSCALE_OPTIONS >& /dev/null
|
||||
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
|
||||
|
@ -40,12 +40,16 @@ _RETVAL_STATUS_NOT_RUNNING=3
|
||||
# Sanity checks.
|
||||
[ -x @CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale ] || exit $_RETVAL_NOT_INSTALLED
|
||||
|
||||
# Source additional command line arguments.
|
||||
[ -f /etc/default/maxscale ] && . /etc/default/maxscale
|
||||
|
||||
#################################
|
||||
# stop/start/status related vars
|
||||
#################################
|
||||
NAME=maxscale
|
||||
DAEMON=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale
|
||||
DAEMON_OPTS='--user=maxscale'
|
||||
DAEMON_OPTS='--user=maxscale $MAXSCALE_OPTIONS'
|
||||
|
||||
# Source function library.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
|
Reference in New Issue
Block a user