-
Notifications
You must be signed in to change notification settings - Fork 0
/
bps_centos_rhel_besclient_reinstall_9_5_16_90.sh
75 lines (64 loc) · 2.2 KB
/
bps_centos_rhel_besclient_reinstall_9_5_16_90.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
#!/bin/sh
# *** ***************************************************************** ***
# *** ***
# *** Casey Cannady (casey.cannady@hcl.com) ***
# *** BigFix Professional Services ***
# *** HCL Software ***
# *** 10/02/2020 ***
# *** ***
# *** This script MUST be run as root on the endpoint. ***
# *** ***
# *** Provided AS-IS and without warranty. ***
# *** ***
# *** This script removes the BES client service, cleans the file ***
# *** system, downloads the latest BES client version, and then ***
# *** reinstalls the BES client service. ***
# *** ***
# *** ***************************************************************** ***
#
# Stop BES client services if running
#
service besclient stop
#
# Remove previous versions of BESClient
#
rpm -ev BESAgent
#
# Clean-up file system
#
rm -rf /etc/opt/BESClient
rm -rf /opt/BESClient
rm -rf /var/opt/BESClient
rm -rf /tmp/BESAgent*.rpm
#
# Create necessary directory on endpoint
#
mkdir -p /etc/opt/BESClient
mkdir -p /opt/BESClient
#
# Download necessary masthead file to endpoint
#
cd /opt/BESClient
wget http://ROOT-BES-FDQN:52311/masthead/masthead.afxm
mv masthead.afxm actionsite.afxm
cp actionsite.afxm /etc/opt/BESClient
#
# Download BESClient version from root BES server
#
cd /tmp
wget http://software.bigfix.com/download/bes/95/BESRelay-9.5.16.90-rhe6.x86_64.rpm
#
# Set BES RPM file permissions
#
chmod 755 BESRelay-9.5.16.90-rhe6.x86_64.rpm
#
# Install BES client and relay packages via RPM
#
rpm -ivh BESRelay-9.5.16.90-rhe6.x86_64.rpm
#
# Restart BES services for good measure
#
service besclient restart
#
# END
#