<commit_before># Install MySQL connector
mv @{destBase}/mysql-connector-java-*.jar @{destBase}/plugins/com.pmease.quickbuild.libs

# Make scripts executable
chmod -R 755 @{destBase}/bin/*.sh

# Initial installation => install service
if [ "$1" = "1" ]; then
  @{destBase}/bin/server.sh install
fi

# Workaround for BUG: http://jira.codehaus.org/browse/MRPM-89
chown -R root:root @{destConf}

# Link back from /etc
rm -rf @{destBase}/conf
ln -sf @{destConf} @{destBase}/conf

# Configure startup script
sed -i 's|PIDDIR="."|PIDDIR="/var/run/@{appServiceName}"|g' @{destBase}/bin/server.sh
sed -i 's|#RUN_AS_USER=|RUN_AS_USER=@{appUserName}|g' @{destBase}/bin/server.sh

# Migrate data and remove old
if [ "$1" = "2" ]; then
  echo Starting migration...
  su - @{appUserName} -c "@{destBase}/bin/migrate.sh @{destBase}.old && rm -rf @{destBase}.old"
fi<commit_msg>when conf files belong to root, migration fails<commit_after># Install MySQL connector
mv @{destBase}/mysql-connector-java-*.jar @{destBase}/plugins/com.pmease.quickbuild.libs

# Make scripts executable
chmod -R 755 @{destBase}/bin/*.sh

# Initial installation => install service
if [ "$1" = "1" ]; then
  @{destBase}/bin/server.sh install
fi

# Link back from /etc
rm -rf @{destBase}/conf
ln -sf @{destConf} @{destBase}/conf

# Configure startup script
sed -i 's|PIDDIR="."|PIDDIR="/var/run/@{appServiceName}"|g' @{destBase}/bin/server.sh
sed -i 's|#RUN_AS_USER=|RUN_AS_USER=@{appUserName}|g' @{destBase}/bin/server.sh

# Migrate data and remove old
if [ "$1" = "2" ]; then
  echo Starting migration...
  su - @{appUserName} -c "@{destBase}/bin/migrate.sh @{destBase}.old && rm -rf @{destBase}.old"
fi
{'fraction_non_alphanumeric': 0.18269230769230768, 'fraction_numerical': 0.009615384615384616, 'mean_word_length': 4.55, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3014880', 'n_tokens_mistral': 638, 'n_tokens_neox': 617, 'n_words': 150}