diff --git a/bin/docklet-supermaster b/bin/docklet-supermaster index e1e5d3e..774a428 100755 --- a/bin/docklet-supermaster +++ b/bin/docklet-supermaster @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh [ $(id -u) != '0' ] && echo "root is needed" && exit 1 @@ -111,7 +111,7 @@ do_start_master () { DAEMON_OPTS_MASTER=$1 - # MODE : start mode + # MODE : start mode # new : clean old data in etcd, global directory and start a new cluster # recovery : start cluster and recover status from etcd and global directory # Default is "recovery" @@ -122,6 +122,10 @@ do_start_master () { do_start_proxy () { + if [ "$DISTRIBUTED_GATEWAY" = "True" ] + then + return 1 + fi log_daemon_msg "Starting $DAEMON_NAME_PROXY daemon in $FS_PREFIX" DAEMON_OPTS_PROXY="--port $PROXY_PORT --api-port $PROXY_API_PORT --default-target=http://localhost:8888" start-stop-daemon --start --background --pidfile $PIDFILE_PROXY --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON_PROXY -- $DAEMON_OPTS_PROXY @@ -168,6 +172,10 @@ do_stop_master () { } do_stop_proxy () { + if [ "$DISTRIBUTED_GATEWAY" = "True" ] + then + return 1 + fi log_daemon_msg "Stopping $DAEMON_NAME_PROXY daemon" start-stop-daemon --stop --quiet --oknodo --remove-pidfile --pidfile $PIDFILE_PROXY --retry 10 log_end_msg $?