2
0
Fork 0
This commit is contained in:
Ducky 2024-04-01 23:15:12 +01:00
parent 2948a24fe8
commit d218f3b102
3 changed files with 48 additions and 23 deletions

View file

@ -4,6 +4,23 @@ function container_exec() {
podman_exec $@
}
function create_log() {
content="$1"
log_dir="/var/log/zio"
log_file="$(date +%Y%m%d%H%M%S).$(echo $RANDOM | md5sum | head -c 6; echo;).log"
if [[ ! $(id -u) = 0 ]]; then
log_dir="/tmp/zio/logs"
fi
log_path="$log_dir/$log_file"
mkdir -p "$log_dir"
echo -e "$content" > "$log_dir/$log_file"
echo "$log_path"
}
function create_tmp_file() {
name="$1"
prefix_dir="/tmp/zio"