Update build.func

revert
This commit is contained in:
tteckster 2024-02-21 18:26:12 -05:00 committed by GitHub
parent 8752a66c03
commit 43de9ca99f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 6 deletions

View File

@ -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