-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCESGSS.bat
121 lines (101 loc) · 3.9 KB
/
CESGSS.bat
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
@echo off
TITLE CESGSS
if "%1" equ "" goto :usage
if %1 equ all goto :all
if %1 equ django goto :django
if %1 equ celery goto :celery
if %1 equ node goto :node
if %1 equ site goto :site
if %1 equ colin goto :colin
if %1 equ clydespace goto :clydespace
if %1 equ ces goto :ces
:usage
echo Argument %1 not defined.
echo.
echo Choose one of the following:
echo.
echo 1. all - Start Django, Celery, and node
echo 1.1 all site - Start all of the above and also open the webpage
echo 2. django - Start Django server
echo 3. celery - Start Celery server
echo 4. node - Start Node server
echo 5. site - Open the GSS webpage
goto:eof
:all
start cmd /c "celery -A cesGroundStation purge -f && celery -A cesGroundStation worker -l info"
start cmd /c "cd frontend/client && node server"
start cmd /c "python manage.py runserver"
if "%2" neq "site" goto :eof
if %2 equ site start "CES-Ground-Station" "http://localhost:8081"
goto :eof
:django
if "%2" equ "-c" (
python manage.py runserver
goto :eof
)
start cmd /c "python manage.py runserver"
goto :eof
:celery
if "%2" equ "-c" (
celery -A cesGroundStation purge -f
celery -A cesGroundStation worker -l info
goto :eof
)
start cmd /c "celery -A cesGroundStation purge -f && celery -A cesGroundStation worker -l info"
goto :eof
:node
if "%2" equ "-c" (
cd frontend/client
node server
goto :eof
)
start cmd /c "cd frontend/client && node server"
goto :eof
:site
start "CES-Ground-Station" "http://localhost:8081"
goto :eof
:colin
echo Pray for Colin!
goto :eof
:clydespace
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
echo " ._______ .__. __. ___. . ._ ._______. "
echo " / ___ \. | \ / / | .__ \ | "
echo " / / \. | \. ./ ./ | \ \ | |' "
echo " | | | \ / | | | | |___. "
echo " '| '| |' \ ./ | ' |' ' .___| "
echo " | | . | '| ' | | "
echo " \ \___/ |. . | / |____. "
echo " \. .________| .| _______./ ._______| "
echo " "
echo " ._______ ._____. ___. _. ._______. "
echo " / \. | .__ / . / ___ | "
echo " / | \ . / \ / / \. | |' "
echo " \ .__ | ' | / \ . | | | |___. "
echo " \__. \ .| .___/ / .___\. \ '| '| ' .___| "
echo " . \ | ' | .______. | | | . | "
echo " \ / | | | | \ \___/ |____. "
echo " \______/ .| .| |_| \_. ._______| "
echo ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
goto :eof
:ces
echo """"""""""""""""""""""""""""""""""""""""""""
echo " ._______ ._______. ._______ "
echo " / ___ \. | / \. "
echo " / / \. | |' / "
echo " | | | |___. \ .__ "
echo " '| '| .___| \__. \ "
echo " | | . | . \ "
echo " \ \___/ |____. \ / "
echo " \. ._______| \______/ "
echo " "
echo " ._______ ._______ ._______ "
echo " / ___ \. / \. / \. "
echo " / / \. / / "
echo " | | . \ .__ \ .__ "
echo " | |' |_ . \__. \ \__. \ "
echo " | | | | . \ . \ "
echo " ' \___/ / \ / \ / "
echo " .___/ \______/ \______/ "
echo ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
goto :eof