-
Notifications
You must be signed in to change notification settings - Fork 35
/
createSupportInfo.sh
executable file
·93 lines (69 loc) · 3.12 KB
/
createSupportInfo.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env bash
echo "##################################################################################"
echo " This script will create a quick dump with information that helps troubleshooting"
echo " Results will be put into the 'support-info.txt' file."
echo "###################################################################################"
supportFile="support-info.txt"
rm $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "Root directory:" >> $supportFile
ls -ahls ./ >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "" >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "_opt directory:" >> $supportFile
ls -ahls ./_opt >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "" >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "_mysql directory:" >> $supportFile
ls -ahls ./_mysql >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "" >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "_cassandra directory:" >> $supportFile
ls -ahls ./_cassandra >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "" >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "docker info:" >> $supportFile
docker info >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "" >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "docker containers:" >> $supportFile
docker ps -a >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "" >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "docker images:" >> $supportFile
docker images >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "" >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "docker volumes:" >> $supportFile
docker volume ls >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "" >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo ".env:" >> $supportFile
envFile=.env
if test -f "$envFile"; then
cat $envFile >> $supportFile
else
echo ".env file does not exist" >> $supportFile
fi
echo "" >> $supportFile
echo "-----------------------------------------------------" >> $supportFile
echo "config.php in '_config' folder:" >> $supportFile
configFile=./_config/config.php
if test -f "$configFile"; then
cat $configFile >> $supportFile
else
echo "config.php not existent in '_config' folder" >> $supportFile
fi
echo "-----------------------------------------------------" >> $supportFile
echo
echo " --> File successfully created"
echo " Please send this file over to TestRail support. Thank you."
echo