diff --git a/bin/LAUNCH.sh b/bin/LAUNCH.sh index 684af83b..58497e01 100755 --- a/bin/LAUNCH.sh +++ b/bin/LAUNCH.sh @@ -382,6 +382,16 @@ function shutdown { 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 { echo -e "\t* Updating thirdparty..." bash -c "(cd ${AIL_FLASK}; ./update_thirdparty.sh)" @@ -395,6 +405,7 @@ function update_thirdparty { } function launch_all { + update; launch_redis; launch_ardb; launch_logs; @@ -408,7 +419,7 @@ function launch_all { 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() { echo "What do you want to Launch?:" @@ -459,6 +470,9 @@ function launch_all { Shutdown) shutdown; ;; + Update) + update; + ;; Update-config) checking_configuration "manual"; ;; @@ -478,6 +492,8 @@ while [ "$1" != "" ]; do ;; -k | --killAll ) killall; ;; + -u | --update ) update; + ;; -t | --thirdpartyUpdate ) update_thirdparty; ;; -c | --crawler ) launching_crawler; diff --git a/configs/update.cfg b/configs/update.cfg new file mode 100644 index 00000000..a72d8bc0 --- /dev/null +++ b/configs/update.cfg @@ -0,0 +1,4 @@ +[Update] +auto_update = True +upstream = upstream +update-fork = False diff --git a/update/current_version b/update/current_version new file mode 100644 index 00000000..b1f74215 --- /dev/null +++ b/update/current_version @@ -0,0 +1 @@ +v1.4 diff --git a/update/v1.5/Update.sh b/update/v1.5/Update.sh new file mode 100755 index 00000000..e69e3b31 --- /dev/null +++ b/update/v1.5/Update.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo $AIL_HOME +