<commit_before>#!/bin/sh
set -e
### BEGIN INIT INFO
# Provides: bamboo
# Required-Start: $local_fs $remote_fs $network $time
# Required-Stop: $local_fs $remote_fs $network $time
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Atlassian Bamboo Server
### END INIT INFO
# INIT Script
######################################
# Define some variables
# Name of app ( bamboo, Confluence, etc )
APP=bamboo
# Name of the user to run as
USER=<%= @user %>
# Location of application's bin directory
BASE=<%= @webappdir %>
JAVA_HOME=<%= @javahome %>
tomcat_pid() {
echo `ps aux | grep "Dcatalina.base=<%= @webappdir %>" | grep -v grep | awk '{ print $2 }'`
}
case "$1" in
  # Start command
  start)
    echo "Starting $APP"
    /bin/su -s /bin/sh -m $USER -c "cd $BASE/logs && $BASE/bin/startup.sh &> /dev/null"
    ;;
  # Stop command
  stop)
    echo "Stopping $APP"
    /bin/su  -s /bin/sh -m $USER -c "$BASE/bin/shutdown.sh &> /dev/null"
    echo "$APP stopped successfully"
    ;;
   # Restart command
   restart)
        $0 stop
        sleep 5
        $0 start
        ;;
   status)
        pid=$(tomcat_pid)
        if [ -n "$pid" ]
        then
                echo "Your Bamboo Instance is running with pid: $pid"
                exit 0<commit_msg>fix init script<commit_after>#!/bin/sh
set -e
### BEGIN INIT INFO
# Provides: bamboo
# Required-Start: $local_fs $remote_fs $network $time
# Required-Stop: $local_fs $remote_fs $network $time
# Should-Start: $syslog
# Should-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Atlassian Bamboo Server
### END INIT INFO
# INIT Script
######################################
# Define some variables
# Name of app ( bamboo, Confluence, etc )
APP=bamboo
# Name of the user to run as
USER=<%= @user %>
# Location of application's bin directory
BASE=<%= @webappdir %>
JAVA_HOME=<%= @javahome %>
tomcat_pid() {
echo `ps aux | grep "Dcatalina.base=<%= @webappdir %>" | grep -v grep | awk '{ print $2 }'`
}
case "$1" in
  # Start command
  start)
    echo "Starting $APP"
    /bin/su -s /bin/sh $USER -c "cd $BASE/logs && $BASE/bin/startup.sh &> /dev/null"
    ;;
  # Stop command
  stop)
    echo "Stopping $APP"
    /bin/su -s /bin/sh $USER -c "$BASE/bin/shutdown.sh &> /dev/null"
    echo "$APP stopped successfully"
    ;;
   # Restart command
   restart)
        $0 stop
        sleep 5
        $0 start
        ;;
   status)
        pid=$(tomcat_pid)
        if [ -n "$pid" ]
        then
                echo "Your Bamboo Instance is running with pid: $pid"
                exit 0
{'fraction_non_alphanumeric': 0.16953035509736541, 'fraction_numerical': 0.009927453226422299, 'mean_word_length': 2.7005649717514126, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '4417394', 'n_tokens_mistral': 970, 'n_tokens_neox': 897, 'n_words': 287}