chg: [LAUNCH] add AIL update by default

This commit is contained in:
Terrtia 2018-11-13 15:45:22 +01:00
parent 7aff45c507
commit 347986a271
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
4 changed files with 26 additions and 1 deletions

View file

@ -382,6 +382,16 @@ function shutdown {
bash -c "./Shutdown.py" bash -c "./Shutdown.py"
} }
function update() {
bash -c "./Update.py"
exitStatus=$?
if [ $exitStatus -ge 1 ]; then
echo -e $RED"\t* Update Error"$DEFAULT
exit
fi
}
function update_thirdparty { function update_thirdparty {
echo -e "\t* Updating thirdparty..." echo -e "\t* Updating thirdparty..."
bash -c "(cd ${AIL_FLASK}; ./update_thirdparty.sh)" bash -c "(cd ${AIL_FLASK}; ./update_thirdparty.sh)"
@ -395,6 +405,7 @@ function update_thirdparty {
} }
function launch_all { function launch_all {
update;
launch_redis; launch_redis;
launch_ardb; launch_ardb;
launch_logs; launch_logs;
@ -408,7 +419,7 @@ function launch_all {
helptext; helptext;
options=("Redis" "Ardb" "Logs" "Queues" "Scripts" "Flask" "Killall" "Shutdown" "Update-config" "Update-thirdparty") options=("Redis" "Ardb" "Logs" "Queues" "Scripts" "Flask" "Killall" "Shutdown" "Update" "Update-config" "Update-thirdparty")
menu() { menu() {
echo "What do you want to Launch?:" echo "What do you want to Launch?:"
@ -459,6 +470,9 @@ function launch_all {
Shutdown) Shutdown)
shutdown; shutdown;
;; ;;
Update)
update;
;;
Update-config) Update-config)
checking_configuration "manual"; checking_configuration "manual";
;; ;;
@ -478,6 +492,8 @@ while [ "$1" != "" ]; do
;; ;;
-k | --killAll ) killall; -k | --killAll ) killall;
;; ;;
-u | --update ) update;
;;
-t | --thirdpartyUpdate ) update_thirdparty; -t | --thirdpartyUpdate ) update_thirdparty;
;; ;;
-c | --crawler ) launching_crawler; -c | --crawler ) launching_crawler;

4
configs/update.cfg Normal file
View file

@ -0,0 +1,4 @@
[Update]
auto_update = True
upstream = upstream
update-fork = False

1
update/current_version Normal file
View file

@ -0,0 +1 @@
v1.4

4
update/v1.5/Update.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
echo $AIL_HOME