root / bin / log.sh @ 5a4b9049
1 | 5a1949a4 | Julien Enselme | #!/bin/sh |
---|---|---|---|
2 | . /home/assos/bin/scripts-config.sh |
||
3 | |||
4 | log=$(cat) |
||
5 | e451b022 | Julien Enselme | command="$1" |
6 | 5a1949a4 | Julien Enselme | |
7 | current_day=$(date "+%Y-%m-%d") |
||
8 | e451b022 | Julien Enselme | current_time=$(date "+%H-%M-%S") |
9 | 5a1949a4 | Julien Enselme | log_file="${d7_dir_log}/${current_day}.log" |
10 | |||
11 | 481fd023 | Julien Enselme | echo -e "#### ${command} - ${current_time}\n${log}\n#### END\n" >> "${log_file}" |