-
Notifications
You must be signed in to change notification settings - Fork 0
/
CESGSS.sh
executable file
·46 lines (39 loc) · 1.04 KB
/
CESGSS.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
#!/bin/bash
if [[ "$1" = "all" ]]; then
echo "hello all"
gnome-terminal -e "python manage.py runserver"
gnome-terminal -e "celery -A cesGroundStation worker -l info"
cd frontend/client && node server.js
fi
if [[ "$1" = "" ]]; then
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
fi
if [[ "$1" = "django" ]]; then
echo "hello django"
python manage.py runserver
fi
if [[ "$1" = "celery" ]]; then
echo "hello celery"
celery -A cesGroundStation worker -l info
fi
if [[ "$1" = "node" ]]; then
echo "hello node"
cd frontend/client && node server.js
fi
if [[ "$1" = "site" ]]; then
echo "hello site"
sensible-browser "localhost:8081/"
fi
if [[ "$2" = "site" ]]; then
echo "hello site"
sensible-browser "localhost:8081/"
fi