Move check alive to be in script, not cron.
This commit is contained in:
parent
60c8ce0af7
commit
fdd1db85e5
@ -6,6 +6,8 @@
|
|||||||
- name: Miner | Facts | System | Global
|
- name: Miner | Facts | System | Global
|
||||||
set_fact:
|
set_fact:
|
||||||
file_server: 'ling@leet'
|
file_server: 'ling@leet'
|
||||||
|
check_alive_start: "[[ ps -ef | grep -v 'grep' | grep -c '"
|
||||||
|
check_alive_end: "' == '0' ]] && "
|
||||||
|
|
||||||
|
|
||||||
## Config File ##
|
## Config File ##
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
user: mfn
|
user: mfn
|
||||||
name: "Start {{ item.name }}"
|
name: "Start {{ item.name }}"
|
||||||
minute: "*/5"
|
minute: "*/5"
|
||||||
job: "[[ ps -ef | grep -v 'grep' | grep -c '{{ item.command }}' == '0' ]] && {{ item.command }}"
|
job: "{{ item.command }}"
|
||||||
state: present
|
state: present
|
||||||
disabled: "{{ not(item.enabled) }}"
|
disabled: "{{ not(item.enabled) }}"
|
||||||
loop: "{{ miners }}"
|
loop: "{{ miners }}"
|
||||||
|
@ -118,7 +118,9 @@
|
|||||||
whoami
|
whoami
|
||||||
pwd
|
pwd
|
||||||
|
|
||||||
time {{ nanominer_exec }} {{ nanominer_config }}
|
{{ check_alive_start }}{{ nanominer_script }}{{ check_alive_end }} {
|
||||||
|
time {{ nanominer_exec }} {{ nanominer_config }}
|
||||||
|
}
|
||||||
|
|
||||||
marker: '{mark}'
|
marker: '{mark}'
|
||||||
marker_begin: "#!{{ bash_exec.stdout }}"
|
marker_begin: "#!{{ bash_exec.stdout }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user