@@ -6,74 +6,74 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
66# Source: [SOURCE_URL]
77
88# App Default Values
9- APP=" [APP_NAME]"
109# Name of the app (e.g. Google, Adventurelog, Apache-Guacamole"
11- var_tags =" [TAGS ]"
10+ APP =" [APP_NAME ]"
1211# Tags for Proxmox VE, maximum 2 pcs., no spaces allowed, separated by a semicolon ; (e.g. database | adblock;dhcp)
13- var_cpu= " [CPU] "
12+ var_tags= " ${var_tags :- [TAGS]} "
1413# Number of cores (1-X) (e.g. 4) - default are 2
15- var_ram= " [RAM] "
14+ var_cpu= " ${var_cpu :- [CPU]} "
1615# Amount of used RAM in MB (e.g. 2048 or 4096)
17- var_disk= " [DISK] "
16+ var_ram= " ${var_ram :- [RAM]} "
1817# Amount of used disk space in GB (e.g. 4 or 10)
19- var_os= " [OS] "
18+ var_disk= " ${var_disk :- [DISK]} "
2019# Default OS (e.g. debian, ubuntu, alpine)
21- var_version= " [VERSION] "
20+ var_os= " ${var_os :- [OS]} "
2221# Default OS version (e.g. 12 for debian, 24.04 for ubuntu, 3.20 for alpine)
23- var_unprivileged= " [UNPRIVILEGED] "
22+ var_version= " ${var_version :- [VERSION]} "
2423# 1 = unprivileged container, 0 = privileged container
24+ var_unprivileged=" ${var_unprivileged:- [UNPRIVILEGED]} "
2525
2626header_info " $APP "
2727variables
2828color
2929catch_errors
3030
3131function update_script() {
32- header_info
33- check_container_storage
34- check_container_resources
32+ header_info
33+ check_container_storage
34+ check_container_resources
3535
36- # Check if installation is present | -f for file, -d for folder
37- if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then
38- msg_error " No ${APP} Installation Found!"
39- exit
40- fi
36+ # Check if installation is present | -f for file, -d for folder
37+ if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then
38+ msg_error " No ${APP} Installation Found!"
39+ exit
40+ fi
4141
42- # Crawling the new version and checking whether an update is required
43- RELEASE=$( curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND])
44- if [[ " ${RELEASE} " != " $( cat /opt/${APP} _version.txt) " ]] || [[ ! -f /opt/${APP} _version.txt ]]; then
45- # Stopping Services
46- msg_info " Stopping $APP "
47- systemctl stop [SERVICE_NAME]
48- msg_ok " Stopped $APP "
42+ # Crawling the new version and checking whether an update is required
43+ RELEASE=$( curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND])
44+ if [[ " ${RELEASE} " != " $( cat /opt/${APP} _version.txt) " ]] || [[ ! -f /opt/${APP} _version.txt ]]; then
45+ # Stopping Services
46+ msg_info " Stopping $APP "
47+ systemctl stop [SERVICE_NAME]
48+ msg_ok " Stopped $APP "
4949
50- # Creating Backup
51- msg_info " Creating Backup"
52- tar -czf " /opt/${APP} _backup_$( date +%F) .tar.gz" [IMPORTANT_PATHS]
53- msg_ok " Backup Created"
50+ # Creating Backup
51+ msg_info " Creating Backup"
52+ tar -czf " /opt/${APP} _backup_$( date +%F) .tar.gz" [IMPORTANT_PATHS]
53+ msg_ok " Backup Created"
5454
55- # Execute Update
56- msg_info " Updating $APP to v${RELEASE} "
57- [UPDATE_COMMANDS]
58- msg_ok " Updated $APP to v${RELEASE} "
55+ # Execute Update
56+ msg_info " Updating $APP to v${RELEASE} "
57+ [UPDATE_COMMANDS]
58+ msg_ok " Updated $APP to v${RELEASE} "
5959
60- # Starting Services
61- msg_info " Starting $APP "
62- systemctl start [SERVICE_NAME]
63- msg_ok " Started $APP "
60+ # Starting Services
61+ msg_info " Starting $APP "
62+ systemctl start [SERVICE_NAME]
63+ msg_ok " Started $APP "
6464
65- # Cleaning up
66- msg_info " Cleaning Up"
67- rm -rf [TEMP_FILES]
68- msg_ok " Cleanup Completed"
65+ # Cleaning up
66+ msg_info " Cleaning Up"
67+ rm -rf [TEMP_FILES]
68+ msg_ok " Cleanup Completed"
6969
70- # Last Action
71- echo " ${RELEASE} " > /opt/${APP} _version.txt
72- msg_ok " Update Successful"
73- else
74- msg_ok " No update required. ${APP} is already at v${RELEASE} "
75- fi
76- exit
70+ # Last Action
71+ echo " ${RELEASE} " > /opt/${APP} _version.txt
72+ msg_ok " Update Successful"
73+ else
74+ msg_ok " No update required. ${APP} is already at v${RELEASE} "
75+ fi
76+ exit
7777}
7878
7979start
@@ -83,4 +83,4 @@ description
8383msg_ok " Completed Successfully!\n"
8484echo -e " ${CREATING}${GN}${APP} setup has been successfully initialized!${CL} "
8585echo -e " ${INFO}${YW} Access it using the following URL:${CL} "
86- echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :[PORT]${CL} "
86+ echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :[PORT]${CL} "
0 commit comments