Permalink
Browse files

Upd: add optional JVM args

  • Loading branch information...
EmoneyRu committed Aug 5, 2017
1 parent 9698bc7 commit 4b084edd96b8d034723f4b21e6eb4112c570224d
Showing with 5 additions and 5 deletions.
  1. +1 −1 playbooks/deploy.yml
  2. +4 −4 scripts-src/check.sh
View
@@ -122,7 +122,7 @@
register: hallmark_result
when: secret_phrase != ""
- name: kill and wait nxt
shell: pkill -SIGKILL -f 'java -cp classes:lib/\*:{{ nxt_conf_name }} ' && while pgrep -f 'java -cp classes:lib/\*:{{ nxt_conf_name }} ' > /dev/null; do sleep 1; done
shell: pkill -SIGKILL -f '^java.+classes:lib/\*:{{ nxt_conf_name }}.+nxt\.Nxt$'
ignore_errors: yes
- name: copy lastest distrib
copy: src={{ nxt_local_folder }}/distrib/nxt.zip dest={{ nxt_remote_folder }}/distrib/nxt.zip
View
@@ -35,7 +35,7 @@ if (( $curr_block_id != 0 )); then
fi
else
echo "$(date) ERROR: The latest generator is too lucky. Looks like a fork" >> $log_file
pkill -f 'java -cp classes:lib/\*:{{ nxt_conf_name }} ' && while pgrep -f 'java -cp classes:lib/\*:{{ nxt_conf_name }} ' > /dev/null; do sleep 1; done
pkill -SIGKILL -f '^java.+classes:lib/\*:{{ nxt_conf_name }}.+nxt\.Nxt$'
rm -f $chain_cached_arc
fi
else
@@ -49,13 +49,13 @@ if (( $curr_block_id != 0 )); then
echo "$(date) OK: block $curr_block_id repeated $prev_block_cnt times" >> $log_file
else
echo "$(date) ERROR: I can't stand block $curr_block_id any longer" >> $log_file
pkill -f 'java -cp classes:lib/\*:{{ nxt_conf_name }} ' && while pgrep -f 'java -cp classes:lib/\*:{{ nxt_conf_name }} ' > /dev/null; do sleep 1; done
pkill -SIGKILL -f '^java.+classes:lib/\*:{{ nxt_conf_name }}.+nxt\.Nxt$'
rm -f $chain_cached_arc
fi
fi
else
echo "$(date) ERROR: nxt is NOT running correctly" >> $log_file
pkill -f 'java -cp classes:lib/\*:{{ nxt_conf_name }} ' && while pgrep -f 'java -cp classes:lib/\*:{{ nxt_conf_name }} ' > /dev/null; do sleep 1; done
pkill -SIGKILL -f '^java.+classes:lib/\*:{{ nxt_conf_name }}.+nxt\.Nxt$'
rm -rf $db_folder $block_id_file $block_cnt_file
if [ -f $chain_cached_arc ]; then
echo "$(date) Restoring cached chain" >> $log_file
@@ -65,7 +65,7 @@ else
echo "$(date) Restoring original chain" >> $log_file
unzip $chain_origin_arc -d ..
fi
nohup java -cp classes:lib/\*:{{ nxt_conf_name }} nxt.Nxt > /dev/null 2>&1 &
nohup java {{ jvm_args|default("") }} -cp classes:lib/\*:{{ nxt_conf_name }}:addons/classes:addons/lib/* nxt.Nxt > /dev/null 2>&1 &
# Restoing sometimes requires more time than 3 minutes
nxt_pid=$!
for i in {1..10}

0 comments on commit 4b084ed

Please sign in to comment.