-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·49 lines (43 loc) · 879 Bytes
/
Copy pathupdate.sh
File metadata and controls
executable file
·49 lines (43 loc) · 879 Bytes
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
#!/usr/bin/env bash
echo "MASSA Acheta update service"
sudo echo
sudo systemctl stop massa_acheta.service
if [[ $? -eq 0 ]]
then
echo "✅ Service stopped"
else
echo
echo "‼ Some error occured. Please check your settings."
exit 1
fi
cd ~/massa_acheta
if [[ $? -eq 0 ]]
then
echo "✅ Ready to update"
rm ./app_stat.json &> /dev/null
else
echo
echo "‼ Some error occured. Please check your settings."
exit 1
fi
source ./bin/activate
git pull && ./bin/pip3 install -r ./requirements.txt
if [[ $? -eq 0 ]]
then
echo "✅ Service updated"
else
echo
echo "‼ Some error occured. Please check your settings."
exit 1
fi
sudo systemctl start massa_acheta.service
if [[ $? -eq 0 ]]
then
echo "✅ Service started"
echo
else
echo
echo "‼ Some error occured. Please check your settings."
exit 1
fi
exit 0