mirror of https://github.com/tteck/Proxmox.git
parent
8752a66c03
commit
43de9ca99f
|
@ -72,7 +72,7 @@ msg_error() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run as root only
|
# Run as root only
|
||||||
root_check() {
|
check_root() {
|
||||||
if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
|
if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
|
||||||
clear
|
clear
|
||||||
msg_error "Please run this script as root."
|
msg_error "Please run this script as root."
|
||||||
|
@ -83,7 +83,7 @@ root_check() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if the shell is using bash
|
# Check if the shell is using bash
|
||||||
shell_check() {
|
check_shell() {
|
||||||
if [[ "$(basename "$SHELL")" != "bash" ]]; then
|
if [[ "$(basename "$SHELL")" != "bash" ]]; then
|
||||||
msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell.
|
msg_error "Your current shell is not Bash. To utilize these scripts, please switch to the Bash shell.
|
||||||
echo -e "\nExiting..."
|
echo -e "\nExiting..."
|
||||||
|
@ -460,11 +460,10 @@ advanced_settings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_script() {
|
install_script() {
|
||||||
pve_check
|
check_root
|
||||||
shell_check
|
|
||||||
root_check
|
|
||||||
arch_check
|
|
||||||
ssh_check
|
ssh_check
|
||||||
|
arch_check
|
||||||
|
pve_check
|
||||||
if systemctl is-active -q ping-instances.service; then
|
if systemctl is-active -q ping-instances.service; then
|
||||||
systemctl -q stop ping-instances.service
|
systemctl -q stop ping-instances.service
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue