up
This commit is contained in:
+7
-3
@@ -7,18 +7,22 @@
|
||||
#------- Check errors func -----------------
|
||||
check() {
|
||||
if [ $1 -ne 0 ]; then
|
||||
printf "$URED** ERROR: $2\n$RESET"
|
||||
printf "$ON_RED** ERROR: $2\n$RESET"
|
||||
exit 1
|
||||
fi
|
||||
printf "$UGREEN** SUCCESS: $2\n$RESET"
|
||||
printf "$ON_GREEN** SUCCESS: $2\n$RESET"
|
||||
}
|
||||
#-------------------------------------------
|
||||
|
||||
#------- Check root func -------------------
|
||||
check_root() {
|
||||
if [ $(id -u) -ne 0 ]; then
|
||||
printf "$URED** You are not root\n$RESET"
|
||||
printf "$ON_RED** You are not root\n$RESET"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
#-------------------------------------------
|
||||
|
||||
print_info() {
|
||||
printf "$ON_GREEN$1$RESET\n"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user