summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/container2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/container b/bin/container
index 5df0fff..ac8feff 100755
--- a/bin/container
+++ b/bin/container
@@ -67,7 +67,7 @@ do
create|remove|rm|restart|start|stop)
USER="${SUDO_USER:-${USER}}"
DATE="$(date +%Y-%m-%d\ %H:%M:%S)"
- HOST="$(hostname -f)"
+ HOST="$(hostname -f 2> /dev/null || hostname)"
# logfile
echo "${DATE} ${HOST} ${USER} ${PROGRAM} ${COMMAND} ${OPTIONS}" >> "/var/log/${PROJECT}/${PROGRAM}.log"