|
|
@ -1,8 +1,7 @@ |
|
|
|
#!/usr/bin/env bash |
|
|
|
#!/usr/bin/env bash |
|
|
|
source <(curl -s https://raw.githubusercontent.com/ELKozel/Proxmox/main/misc/build.func) |
|
|
|
source <(curl -s https://raw.githubusercontent.com/ELKozel/Proxmox/main/misc/build.func) |
|
|
|
# Copyright (c) 2021-2024 tteck |
|
|
|
# Copyright (c) 2024 ELKozel |
|
|
|
# Author: tteck (tteckster) |
|
|
|
# Author: T.H. (ELKozel) |
|
|
|
# Co-Author: T.H. (ELKozel) |
|
|
|
|
|
|
|
# License: MIT |
|
|
|
# License: MIT |
|
|
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE |
|
|
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE |
|
|
|
|
|
|
|
|
|
|
@ -54,27 +53,27 @@ function default_settings() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function update_script() { |
|
|
|
function update_script() { |
|
|
|
header_info |
|
|
|
header_info |
|
|
|
if [[ ! -f /etc/systemd/system/elasticsearch.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi |
|
|
|
if [[ ! -f /etc/systemd/system/elasticsearch.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi |
|
|
|
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then |
|
|
|
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then |
|
|
|
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt |
|
|
|
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt |
|
|
|
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit |
|
|
|
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
msg_info "Stopping ${APP}" |
|
|
|
msg_info "Stopping ${APP}" |
|
|
|
$STD /bin/systemctl stop elasticsearch.service |
|
|
|
$STD /bin/systemctl stop elasticsearch.service |
|
|
|
msg_ok "Stopped ${APP}" |
|
|
|
msg_ok "Stopped ${APP}" |
|
|
|
|
|
|
|
|
|
|
|
msg_info "Updating ${APP}" |
|
|
|
msg_info "Updating ${APP}" |
|
|
|
$STD apt-get install elasticsearch &>/dev/null |
|
|
|
$STD apt-get install elasticsearch &>/dev/null |
|
|
|
msg_ok "Updated ${APP}" |
|
|
|
msg_ok "Updated ${APP}" |
|
|
|
|
|
|
|
|
|
|
|
msg_info "Starting ${APP}" |
|
|
|
msg_info "Starting ${APP}" |
|
|
|
$STD /bin/systemctl restart elasticsearch.service |
|
|
|
$STD /bin/systemctl restart elasticsearch.service |
|
|
|
msg_ok "Started ${APP}" |
|
|
|
msg_ok "Started ${APP}" |
|
|
|
|
|
|
|
|
|
|
|
msg_ok "Updated Successfully" |
|
|
|
msg_ok "Updated Successfully" |
|
|
|
exit |
|
|
|
exit |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
start |
|
|
|
start |
|
|
@ -83,4 +82,4 @@ description |
|
|
|
|
|
|
|
|
|
|
|
msg_ok "Completed Successfully!\n" |
|
|
|
msg_ok "Completed Successfully!\n" |
|
|
|
echo -e "${APP} should be reachable on port 9200 |
|
|
|
echo -e "${APP} should be reachable on port 9200 |
|
|
|
${BL}http://${IP}:5678${CL} \n" |
|
|
|
${BL}http://${IP}:9200${CL} \n" |
|
|
|