mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-17 12:45:22 +01:00
20 lines
333 B
Bash
20 lines
333 B
Bash
#!/bin/sh
|
|
|
|
trace()
|
|
{
|
|
if [ -n "${TRACING}" ]; then
|
|
local str="$(date -Is) $$ ${1}"
|
|
echo "${str}" 1>&2
|
|
echo "${str}" >> /cnlogs/otsclient.log
|
|
fi
|
|
}
|
|
|
|
trace_rc()
|
|
{
|
|
if [ -n "${TRACING}" ]; then
|
|
local str="$(date -Is) $$ Last return code: ${1}"
|
|
echo "${str}" 1>&2
|
|
echo "${str}" >> /cnlogs/otsclient.log
|
|
fi
|
|
}
|