@@ -9,7 +9,7 @@ APP="Excalidraw"
99TAGS=" diagrams"
1010var_cpu=" ${var_cpu:- 2} "
1111var_ram=" ${var_ram:- 3072} "
12- var_disk=" ${var_disk:- 6 } "
12+ var_disk=" ${var_disk:- 10 } "
1313var_os=" ${var_os:- debian} "
1414var_version=" ${var_version:- 12} "
1515var_unprivileged=" ${var_unprivileged:- 1} "
@@ -20,46 +20,46 @@ color
2020catch_errors
2121
2222function update_script() {
23- header_info
24- check_container_storage
25- check_container_resources
23+ header_info
24+ check_container_storage
25+ check_container_resources
2626
27- if [[ ! -d /opt/excalidraw ]]; then
28- msg_error " No ${APP} Installation Found!"
29- exit
30- fi
27+ if [[ ! -d /opt/excalidraw ]]; then
28+ msg_error " No ${APP} Installation Found!"
29+ exit
30+ fi
3131
32- RELEASE=$( curl -fsSL https://api.github.com/repos/excalidraw/excalidraw/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
33- if [[ " ${RELEASE} " != " $( cat /opt/excalidraw_version.txt) " ]] || [[ ! -f /opt/excalidraw_version.txt ]]; then
34- msg_info " Stopping $APP "
35- systemctl stop excalidraw
36- msg_ok " Stopped $APP "
32+ RELEASE=$( curl -fsSL https://api.github.com/repos/excalidraw/excalidraw/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
33+ if [[ " ${RELEASE} " != " $( cat /opt/excalidraw_version.txt) " ]] || [[ ! -f /opt/excalidraw_version.txt ]]; then
34+ msg_info " Stopping $APP "
35+ systemctl stop excalidraw
36+ msg_ok " Stopped $APP "
3737
38- msg_info " Updating $APP to v${RELEASE} "
39- cd /tmp
40- temp_file=$( mktemp)
41- curl -fsSL " https://github.com/excalidraw/excalidraw/archive/refs/tags/v${RELEASE} .tar.gz" -o " $temp_file "
42- tar xzf $temp_file
43- rm -rf /opt/excalidraw
44- mv excalidraw-${RELEASE} /opt/excalidraw
45- cd /opt/excalidraw
46- $STD yarn
47- msg_ok " Updated $APP to v${RELEASE} "
38+ msg_info " Updating $APP to v${RELEASE} "
39+ cd /tmp
40+ temp_file=$( mktemp)
41+ curl -fsSL " https://github.com/excalidraw/excalidraw/archive/refs/tags/v${RELEASE} .tar.gz" -o " $temp_file "
42+ tar xzf $temp_file
43+ rm -rf /opt/excalidraw
44+ mv excalidraw-${RELEASE} /opt/excalidraw
45+ cd /opt/excalidraw
46+ $STD yarn
47+ msg_ok " Updated $APP to v${RELEASE} "
4848
49- msg_info " Starting $APP "
50- systemctl start excalidraw
51- msg_ok " Started $APP "
49+ msg_info " Starting $APP "
50+ systemctl start excalidraw
51+ msg_ok " Started $APP "
5252
53- msg_info " Cleaning Up"
54- rm -rf $temp_file
55- msg_ok " Cleanup Completed"
53+ msg_info " Cleaning Up"
54+ rm -rf $temp_file
55+ msg_ok " Cleanup Completed"
5656
57- echo " ${RELEASE} " > /opt/excalidraw_version.txt
58- msg_ok " Update Successful"
59- else
60- msg_ok " No update required. ${APP} is already at v${RELEASE} "
61- fi
62- exit
57+ echo " ${RELEASE} " > /opt/excalidraw_version.txt
58+ msg_ok " Update Successful"
59+ else
60+ msg_ok " No update required. ${APP} is already at v${RELEASE} "
61+ fi
62+ exit
6363}
6464
6565start
@@ -69,4 +69,4 @@ description
6969msg_ok " Completed Successfully!\n"
7070echo -e " ${CREATING}${GN}${APP} setup has been successfully initialized!${CL} "
7171echo -e " ${INFO}${YW} Access it using the following URL:${CL} "
72- echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :3000${CL} "
72+ echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :3000${CL} "
0 commit comments