Initial commit.

This commit is contained in:
2026-08-09 19:46:36 +05:30
parent 8b6e4000d2
commit b3db479272
7 changed files with 756 additions and 3 deletions
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
function_log () {
if [ "$1" ]; then
if [ "${MODE_QUIET}" == false ]; then
echo -e $1
elif [ "${MODE_QUIET}" == true ] && [ "$#" -ge 2 ] && [ "$2" == true ]; then
echo -e $1
fi
echo -e "`date "+%I:%M:%S"` $(hostname) $SID: $1" | sed -r 's/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g' | sed -e 's/^[ \t]*//' >>$FILE_LOG
fi
}
function_strtolower () {
[[ "$1" == "" ]] && { function_log "error: ${LIGHT_RED}failed to locate any argument in request. File: include/helper.inc, Line: 17${NC}"; exit 1; }
echo "$(echo "$1" | tr '[:upper:]' '[:lower:]')"
}
function_strtoupper () {
[[ "$1" == "" ]] && { function_log "error: ${LIGHT_RED}failed to locate any argument in request. File: include/helper.inc, Line: 25${NC}"; exit 1; }
echo "$(echo "$1" | tr '[:lower:]' '[:upper:]')"
}