forked from cakefm/crowd_task_manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_modules.sh
executable file
·97 lines (80 loc) · 2.59 KB
/
run_modules.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/sh
# stop running modules
if screen -list | grep -q "omr_planner"; then
echo 'stopping omr_planner'
screen -XS omr_planner quit
fi
if screen -list | grep -q "ce_comm"; then
echo 'stopping ce_comm'
screen -XS ce_comm quit
fi
if screen -list | grep -q "pdf2mei"; then
echo 'stopping pdf2mei'
screen -XS pdf2mei quit
fi
if screen -list | grep -q "slicer"; then
echo 'stopping slicer'
screen -XS slicer quit
fi
if screen -list | grep -q "task_scheduler"; then
echo 'stopping task_scheduler'
screen -XS task_scheduler quit
fi
if screen -list | grep -q "score_rebuilder"; then
echo 'stopping score_rebuilder'
screen -XS score_rebuilder quit
fi
if screen -list | grep -q "github_init"; then
echo 'stopping github_init'
screen -XS github_init quit
fi
if screen -list | grep -q "github_update"; then
echo 'stopping github_update'
screen -XS github_update quit
fi
# start modules
if ! screen -list | grep -q "omr_planner"; then
echo 'starting omr_planner'
cd $HOME/crowd-task-manager/project_manager
screen -dm -S omr_planner bash -c 'python3 omr_planner.py'
fi
if ! screen -list | grep -q "ce_comm"; then
echo 'starting ce_comm'
cd $HOME/crowd-task-manager/ce_integration
screen -dm -S ce_comm bash -c 'python3 ce_communicator.py'
fi
if ! screen -list | grep -q "pdf2mei"; then
echo 'starting pdf2mei'
cd $HOME/crowd-task-manager/pdf_to_mei
screen -dm -S pdf2mei bash -c 'python3 pdf_to_mei.py'
fi
if ! screen -list | grep -q "slicer"; then
echo 'starting slicer'
cd $HOME/crowd-task-manager/slicer
screen -dm -S slicer bash -c 'python3 slicer_mq.py'
fi
if ! screen -list | grep -q "task_scheduler"; then
echo 'starting task_scheduler'
cd $HOME/crowd-task-manager/task_scheduler
screen -dm -S task_scheduler bash -c 'python3 task_scheduler.py'
fi
if ! screen -list | grep -q "score_rebuilder"; then
echo 'starting score_rebuilder'
cd $HOME/crowd-task-manager/score_rebuilder
screen -dm -S score_rebuilder bash -c 'python3 score_rebuilder_mq.py'
fi
if ! screen -list | grep -q "github_init"; then
echo 'starting github_init'
cd $HOME/crowd-task-manager/github
screen -dm -S github_init bash -c 'python3 github_init_mq.py'
fi
if ! screen -list | grep -q "github_update"; then
echo 'starting github_update'
cd $HOME/crowd-task-manager/github
screen -dm -S github_update bash -c 'python3 github_update_mq.py'
fi
if ! screen -list | grep -q "flask"; then
echo 'starting flask api.py'
cd $HOME/crowd-task-manager/api
screen -dm -S flask bash -c 'sudo python3 api.py'
fi