<commit_before>#!/bin/bash

RUN_DIR=/var/vcap/sys/run/redis-commander
LOG_DIR=/var/vcap/sys/log/redis-commander
PIDFILE=${RUN_DIR}/redis-commander.pid
COMMANDER=/var/vcap/packages/redis-commander/bin/redis-commander.js

case $1 in

  start)
    mkdir -p $RUN_DIR $LOG_DIR
    chown -R vcap:vcap $RUN_DIR $LOG_DIR

    echo $$ >> $PIDFILE

    cd /var/vcap/packages/nodejs

    exec chpst -u vcap:vcap ./bin/node $COMMANDER \
      >>  $LOG_DIR/redis-commander.stdout.log \
      2>> $LOG_DIR/redis-commander.stderr.log

    ;;

  stop)

    kill -9 `cat $PIDFILE`

    rm -f $PIDFILE

    ;;

  *)
    echo "Usage: ctl {start|stop}" ;;

esac<commit_msg>fix ctl script with redis commander properties<commit_after>#!/bin/bash

RUN_DIR=/var/vcap/sys/run/redis-commander
LOG_DIR=/var/vcap/sys/log/redis-commander
PIDFILE=${RUN_DIR}/redis-commander.pid
COMMANDER=/var/vcap/packages/redis-commander/bin/redis-commander.js

case $1 in

  start)
    mkdir -p $RUN_DIR $LOG_DIR
    chown -R vcap:vcap $RUN_DIR $LOG_DIR

    echo $$ >> $PIDFILE

    cd /var/vcap/packages/nodejs

    exec chpst -u vcap:vcap ./bin/node $COMMANDER \
      <% if p('redis-commander.redis_server_port') != '' %>--redis-port  <%= p('redis-commander.redis_server_port') %> \<% end %>
      <% if p('redis-commander.redis_server_host') != '' %>--redis-host <%= p('redis-commander.redis_server_host') %> \<% end %>
      <% if p('redis-commander.redis_server_socket') != '' %>--redis-socket <%= p('redis-commander.redis_server_socket') %> \<% end %>
      <% if p('redis-commander.redis_password') != '' %>--redis-password <%= p('redis-commander.redis_password') %> \<% end %>
      <% if p('redis-commander.redis_db') != '' %>--redis-db <%= p('redis-commander.redis_db') %> \<% end %>
      <% if p('redis-commander.redis_auth_username') != '' %>--http-auth-username <%= p('redis-commander.redis_auth_username') %> \<% end %>
      <% if p('redis-commander.redis_auth_password') != '' %>--http-auth-password <%= p('redis-commander.redis_auth_password') %> \<% end %>
      <% if p('redis-commander.server_port') != '' %>--port <%= p('redis-commander.server_port') %> \<% end %>
      <% if p('redis-commander.server_address') != '' %>--address <%= p('redis-commander.server_address') %> \<% end %>
      >>  $LOG_DIR/redis-commander.stdout.log \
      2>> $LOG_DIR/redis-commander.stderr.log

    ;;

  stop)

    kill -9 `cat $PIDFILE`

    rm -f $PIDFILE

    ;;

  *)
    echo "Usage: ctl {start|stop}" ;;

esac
{'fraction_non_alphanumeric': 0.19943593875906526, 'fraction_numerical': 0.0024174053182917004, 'mean_word_length': 3.237201365187713, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 42, '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': '3938209', 'n_tokens_mistral': 1055, 'n_tokens_neox': 950, 'n_words': 138}