@@ -20,26 +20,31 @@ color
2020catch_errors
2121
2222function update_script() {
23- header_info
24- check_container_storage
25- check_container_resources
26- msg_info " Updating ${APP} LXC"
23+ header_info
24+ check_container_storage
25+ check_container_resources
2726
28- if command -v ghost & > /dev/null; then
29- current_version=$( ghost version | grep ' Ghost-CLI version' | awk ' {print $3}' )
30- latest_version=$( npm show ghost-cli version)
31- if [ " $current_version " != " $latest_version " ]; then
32- msg_info " Updating ${APP} from version v${current_version} to v${latest_version} "
33- $STD npm install -g ghost-cli@latest
34- msg_ok " Updated Successfully"
35- else
36- msg_ok " ${APP} is already at v${current_version} "
37- fi
27+ if ! dpkg-query -W -f=' ${Status}' mariadb-server 2> /dev/null | grep -q " install ok installed" ; then
28+ setup_mysql
29+ fi
30+ NODE_VERSION=" 22" setup_nodejs
31+
32+ msg_info " Updating ${APP} LXC"
33+ if command -v ghost & > /dev/null; then
34+ current_version=$( ghost version | grep ' Ghost-CLI version' | awk ' {print $3}' )
35+ latest_version=$( npm show ghost-cli version)
36+ if [ " $current_version " != " $latest_version " ]; then
37+ msg_info " Updating ${APP} from version v${current_version} to v${latest_version} "
38+ $STD npm install -g ghost-cli@latest
39+ msg_ok " Updated Successfully"
3840 else
39- msg_error " No ${APP} Installation Found!"
40- exit
41+ msg_ok " ${APP} is already at v${current_version} "
4142 fi
43+ else
44+ msg_error " No ${APP} Installation Found!"
4245 exit
46+ fi
47+ exit
4348}
4449
4550start
@@ -49,4 +54,4 @@ description
4954msg_ok " Completed Successfully!\n"
5055echo -e " ${CREATING}${GN}${APP} setup has been successfully initialized!${CL} "
5156echo -e " ${INFO}${YW} Access it using the following URL:${CL} "
52- echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :2368${CL} "
57+ echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :2368${CL} "
0 commit comments