Files
2026-03-06 11:38:35 +07:00

33 lines
612 B
Bash
Executable File

#!/bin/bash
#--- Import colors ---
. ./scripts/colors.sh
#---------------------
#------- Check errors func -----------------
check() {
if [ $1 -ne 0 ]; then
print_err "** ERROR: $2"
exit 1
fi
print_info "** SUCCESS: $2"
}
#-------------------------------------------
#------- Check root func -------------------
check_root() {
if [ $(id -u) -ne 0 ]; then
printf "$ON_RED** You are not root\n$RESET"
exit 1
fi
}
#-------------------------------------------
print_info() {
printf "\033[30;42m$1$RESET\n"
}
print_err() {
printf "$ON_RED$1$RESET\n"
}