@@ -20,18 +20,30 @@ color
2020catch_errors
2121
2222function update_script() {
23- header_info
24- check_container_storage
25- check_container_resources
26- if [[ ! -d /etc/neo4j ]]; then
27- msg_error " No ${APP} Installation Found!"
28- exit
29- fi
30- msg_info " Updating ${APP} "
31- $STD apt-get update
32- $STD apt-get -y upgrade
33- msg_ok " Updated Successfully"
23+ header_info
24+ check_container_storage
25+ check_container_resources
26+ if [[ ! -d /etc/neo4j ]]; then
27+ msg_error " No ${APP} Installation Found!"
3428 exit
29+ fi
30+ if ! dpkg -l | grep -q temurin-21-jre; then
31+ msg_info " Installing Adoptium JDK"
32+ $STD apt-get install -y \
33+ gnupg2 \
34+ lsb-release
35+ mkdir -p /etc/apt/keyrings
36+ curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor > /etc/apt/trusted.gpg.d/adoptium.gpg
37+ echo " deb https://packages.adoptium.net/artifactory/deb $( awk -F= ' /^VERSION_CODENAME/{print$2}' /etc/os-release) main" > /etc/apt/sources.list.d/adoptium.list
38+ $STD apt-get update
39+ $STD apt-get install -y temurin-21-jre
40+ msg_ok " Adoptium JDK installed"
41+ fi
42+ msg_info " Updating ${APP} "
43+ $STD apt-get update
44+ $STD apt-get -y upgrade
45+ msg_ok " Updated Successfully"
46+ exit
3547}
3648
3749start
@@ -41,4 +53,4 @@ description
4153msg_ok " Completed Successfully!\n"
4254echo -e " ${CREATING}${GN}${APP} setup has been successfully initialized!${CL} "
4355echo -e " ${INFO}${YW} Access it using the following URL:${CL} "
44- echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :7474${CL} "
56+ echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :7474${CL} "
0 commit comments