@@ -0,0 +1,2 @@ |
||
1 |
+version=0.0.1 |
|
2 |
+deldb=false |
@@ -1,7 +1,28 @@ |
||
1 | 1 |
#!/bin/bash |
2 | 2 |
|
3 |
+# Change Current Directory |
|
3 | 4 |
cd /root/pai2/minipai2/ |
4 | 5 |
|
6 |
+# Load Old Mini Paiai Configuration |
|
7 |
+source minipai2.conf |
|
8 |
+ |
|
9 |
+# Old Version |
|
10 |
+oldversion=$version |
|
11 |
+ |
|
12 |
+# Fetch Remote Refs |
|
13 |
+git pull |
|
14 |
+ |
|
15 |
+# Load New Mini Paiai Configuration |
|
16 |
+source minipai2.conf |
|
17 |
+ |
|
18 |
+# If Version Upgrade & Delete Database True |
|
19 |
+if [ "$oldversion" != "$version" ] && [ "$deldb" = "true" ]; then |
|
20 |
+ # Delete Database |
|
21 |
+ rm minipai2.db |
|
22 |
+fi |
|
23 |
+ |
|
24 |
+# Start Server |
|
5 | 25 |
nohup python main.py --port=8002 &>/tmp/minipai2.log & |
6 | 26 |
|
7 |
-cd - |
|
27 |
+# Change Current Directory |
|
28 |
+cd - |