mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
Fixing issues with the code
This commit is contained in:
parent
07a423742a
commit
28e4954da6
1 changed files with 25 additions and 24 deletions
49
ct/kibana.sh
49
ct/kibana.sh
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
source <(curl -s https://raw.githubusercontent.com/ELKozel/Proxmox/main/misc/build.func)
|
||||||
# Copyright (c) 2024 ELKozel
|
# Copyright (c) 2024 ELKozel
|
||||||
# Author: T.H. (ELKozel)
|
# Author: T.H. (ELKozel)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
|
@ -8,11 +8,11 @@ source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build
|
||||||
function header_info {
|
function header_info {
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
_ ___ _
|
__ __ _ __
|
||||||
| |/ (_) |__ __ _ _ __ __ _
|
/ //_/(_) /_ ____ _____ ____ _
|
||||||
| ' /| | '_ \ / _` | '_ \ / _` |
|
/ ,< / / __ \/ __ `/ __ \/ __ `/
|
||||||
| . \| | |_) | (_| | | | | (_| |
|
/ /| |/ / /_/ / /_/ / / / / /_/ /
|
||||||
|_|\_\_|_.__/ \__,_|_| |_|\__,_|
|
/_/ |_/_/_.___/\__,_/_/ /_/\__,_/
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -53,27 +53,28 @@ 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/Kibana.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 kibana.service
|
systemctl stop Kibana
|
||||||
msg_ok "Stopped ${APP}"
|
msg_ok "Stopped ${APP}"
|
||||||
|
|
||||||
msg_info "Updating ${APP}"
|
msg_info "Updating ${APP} LXC"
|
||||||
$STD apt-get install kibana &>/dev/null
|
apt-get update &>/dev/null
|
||||||
msg_ok "Updated ${APP}"
|
apt-get -y upgrade &>/dev/null
|
||||||
|
msg_ok "Updated ${APP} LXC"
|
||||||
|
|
||||||
msg_info "Starting ${APP}"
|
msg_info "Starting ${APP}"
|
||||||
$STD /bin/systemctl restart kibana.service
|
systemctl start Kibana
|
||||||
msg_ok "Started ${APP}"
|
msg_ok "Started ${APP}"
|
||||||
|
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
@ -82,4 +83,4 @@ description
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${APP} Setup should be reachable by going to the following URL.
|
echo -e "${APP} Setup should be reachable by going to the following URL.
|
||||||
${BL}http://${IP}:5601${CL} \n"
|
${BL}http://${IP}:5601${CL} \n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue