diff --git a/init/msm b/init/msm index 1d7808c..4d68263 100755 --- a/init/msm +++ b/init/msm @@ -1988,17 +1988,19 @@ command_server_console() { # $2: The parameter # $3: The value to set it to command_set_config() { - if [[ -f "${SERVER_CONF[$1]}" ]]; then - if grep "$2" ${SERVER_CONF[$1]} >/dev/null; then - sed -i /$2=/s/.*/"$2=$3"/g ${SERVER_CONF[$1]} - else - echo "$2=$3" >> ${SERVER_CONF[$1]} - fi - fi if server_is_running "$1"; then - echo "Server is running, restarting in 10secs to ensure update" - command_server_restart $1; - fi + echo "Server is running, please stop the server before running this command: sudo msm "${SERVER_NAME[$1]}" stop" + else + if [[ -f "${SERVER_CONF[$1]}" ]]; then + if grep "$2" ${SERVER_CONF[$1]} >/dev/null; then + sed -i /$2=/s/.*/"$2=$3"/g ${SERVER_CONF[$1]} + else + echo "$2=$3" >> ${SERVER_CONF[$1]} + fi + echo "To see these changes please restart this server with: sudo msm "${SERVER_NAME[$1]}" start"; + fi + + fi } ### Main Functions