<commit_before>#!/bin/bash
#
# cloudstack-simulator CloudStack Simulator
#
# chkconfig: 345 50 50
# description: CloudStack Simulator Service

source /etc/profile.d/maven.sh

CLOUDSTACK_SOURCE=<%= @node["cloudstack"]["development"]["source_path"] %>
CLOUDSTACK_LOGFILE=<%= @node["cloudstack"]["development"]["log"] %>

case "$1" in
	start)
		echo -n "Starting CloudStack Simulator: "
		cd $CLOUDSTACK_SOURCE
		nohup mvn -Dsimulator -pl :cloud-client-ui jetty:run > $CLOUDSTACK_LOGFILE 2>&1 &
		while ! nc -vz localhost 8096; do sleep 10; done
		echo "OK"
		;;
	stop)
		echo -n "Stopping CloudStack Simulator: "
		cd $CLOUDSTACK_SOURCE
		mvn -Dsimulator -pl client jetty:stop
		echo "OK"
		;;
	reload|restart)
		$0 stop
		$0 start
	;;
	*)
		echo "Usage: $0 start|stop|restart|reload"
		exit 1<commit_msg>do not block<commit_after>#!/bin/bash
#
# cloudstack-simulator CloudStack Simulator
#
# chkconfig: 345 50 50
# description: CloudStack Simulator Service

source /etc/profile.d/maven.sh

CLOUDSTACK_SOURCE=<%= @node["cloudstack"]["development"]["source_path"] %>
CLOUDSTACK_LOGFILE=<%= @node["cloudstack"]["development"]["log"] %>

case "$1" in
	start)
		echo -n "Starting CloudStack Simulator: "
		cd $CLOUDSTACK_SOURCE
		nohup mvn -Dsimulator -pl :cloud-client-ui jetty:run > $CLOUDSTACK_LOGFILE 2>&1 &
		echo "OK"
		;;
	stop)
		echo -n "Stopping CloudStack Simulator: "
		cd $CLOUDSTACK_SOURCE
		mvn -Dsimulator -pl client jetty:stop
		echo "OK"
		;;
	reload|restart)
		$0 stop
		$0 start
	;;
	*)
		echo "Usage: $0 start|stop|restart|reload"
		exit 1
{'fraction_non_alphanumeric': 0.14414414414414414, 'fraction_numerical': 0.021879021879021878, 'mean_word_length': 4.593525179856115, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5096880', 'n_tokens_mistral': 656, 'n_tokens_neox': 610, 'n_words': 140}