#!/bin/bash

# h4 script to generate an hbrsrv support bundle.

if [ "$1" == "" ]; then
   /usr/bin/echo "Usage: $0 /path/to/bundle.tar.bz2``" 1>&2
   exit 1
fi

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root" 1>&2
   exit 2
fi

HIDE_TIMESTAMPS="1" /usr/bin/python3 /opt/vmware/h4/h4dm/bin/support-bundle.py "$1"

/usr/bin/chown h4.h4 "$1"
