-
Notifications
You must be signed in to change notification settings - Fork 1
/
grommunio-support
executable file
·38 lines (37 loc) · 1.88 KB
/
grommunio-support
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# SPDX-License-Identifier: AGPL-3.0-or-later
# SPDX-FileCopyrightText: 2021 grommunio GmbH
if [ -e "/sbin/supportconfig" ] ; then
echo "INFO - Please wait while grommunio-support generates your support package"
while :; do
printf "."
sleep 1
done &
bgid=$!
rm -rf /var/log/grommunio-support/* > /dev/null 2>&1
supportconfig -B "grommunio-support" -E "[email protected]" -N "grommunio Support" -O "grommunio GmbH" -R /var/log/grommunio-support -L -Q -i CRASH,DISK,ETC,HA,LVM,MEM,NET,PROC,SMART,SRAID,SYSCONFIG,SYSFS,SYSFS,WEB
if [ -e "/var/log/grommunio-support/scc_grommunio-support.txz" ] ; then
kill "$bgid" > /dev/null 2>&1
tar rf /var/log/grommunio-support/scc_grommunio-support.txz /var/log/grommunio-setup.log > /dev/null 2>&1
mv /var/log/grommunio-support/scc_grommunio-support.txz /usr/share/grommunio-admin-web/grommunio-support.txz > /dev/null 2>&1
chmod 444 /usr/share/grommunio-admin-web/grommunio-support.txz > /dev/null 2>&1
echo ""
echo "SUCCESS - The support package was generated successfully and is available"
echo " for download at <ADMIN-URL>/grommunio-support.txz"
echo " Download the package and send it to [email protected] ."
echo ""
echo "Note: This package might contain sensitive information. If this is"
echo " a concern, prune private data from the archive before"
echo " sending it to grommunio support."
echo ""
echo "Support data is used only for diagnostic purposes and is considered confidential information."
else
kill "$bgid" > /dev/null 2>&1
echo ""
echo "ERROR - Something went wrong while generating your support package"
echo " Contact grommunio support <[email protected]> to resolve this issue."
fi
else
echo "ERROR - This system is missing a required dependency to generate support packages"
echo " Install the dependency by running `zypper in supportutils`"
fi