Skip to content
Snippets Groups Projects
Commit a776f0b1 authored by Anthony's avatar Anthony
Browse files

Add more context info

parent 41645991
No related branches found
No related tags found
1 merge request!5Add info cli tool
...@@ -98,7 +98,24 @@ case $action in ...@@ -98,7 +98,24 @@ case $action in
;; ;;
"info") "info")
echo "** Info about your Dolibarr instance **" echo "** Info about your Dolibarr instance **"
echo -e "Generated at: $(date '+%Y-%m-%d %H:%M:%S')\n"
# Date and time
timestamp=$(date '+%Y-%m-%d %H:%M:%S')
# Hostname
host=$(hostname)
# Dolibarr instance name (parent of dolibarr_src)
instance_path=$(realpath dolibarr_src/.. 2>/dev/null)
instance_name=$(basename "$instance_path")
echo -e "Generated at: $timestamp"
echo -e "Machine: $host"
echo -e "Instance: $instance_name"
echo -e "Instance path: $instance_path\n"
## Docker deployment ## Docker deployment
if [ "$(is_docker)" -eq 1 ]; then if [ "$(is_docker)" -eq 1 ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment