Skip to content

Commit

Permalink
Merge pull request #8 from site24x7/pre_release
Browse files Browse the repository at this point in the history
To download and enable the Network Module automatically
  • Loading branch information
ShrinivasanSS authored Apr 27, 2024
2 parents ca88c3e + e41bdcc commit d8f7896
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN apt-get update -y && \
apt-get install -y curl && \
apt-get install -y iputils-ping && \
wget -O Site24x7OnPremisePoller_64bit.bin https://staticdownloads.site24x7.com/probe/Site24x7OnPremisePoller_64bit.bin && \
wget -O Networkplus_lin.zip https://staticdownloads.site24x7.com/network/Networkplus_lin.zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
23 changes: 23 additions & 0 deletions s247poller_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ PROXY="$(printenv PROXY)"
echo "PROXY : $PROXY"
# Proxy Ends

ENABLE_NETWORK_MODULE="$(printenv ENABLE_NETWORK_MODULE)"
if [ -z "$ENABLE_NETWORK_MODULE" ]; then
ENABLE_NETWORK_MODULE=false
fi
echo "ENABLE_NETWORK_MODULE : $ENABLE_NETWORK_MODULE"

# Download and install On-Premise Poller gent based on DC.
cd /opt
DOWNLOAD_URL=""
Expand All @@ -46,6 +52,7 @@ setServerDomain() {
setServerDomain

DOWNLOAD_URL="$SERVER/probe/Site24x7OnPremisePoller_64bit.bin"
NETWORKMODULE_DOWNLOAD_URL="$SERVER/network/Networkplus_lin.zip"

# Commenting the following lines as binary is already included within the image.
# echo Download Starts
Expand All @@ -65,6 +72,22 @@ bash ./Site24x7OnPremisePoller_64bit.bin -i silent

echo "Silent installation of OPP completed"


#Download and Enable the Network Module
if [ "$ENABLE_NETWORK_MODULE" = "true" ]; then
#echo Going to Download Network Module...
#echo Network Module Download URL : $NETWORKMODULE_DOWNLOAD_URL
#wget $NETWORKMODULE_DOWNLOAD_URL
#echo Network Module Download is completed

echo Going to unzip the Network Module Download
unzip Networkplus_lin.zip -d /opt/Site24x7OnPremisePoller
echo Network Module is successfully extracted

echo Going to enable the Network Module in modules.conf
echo -e "\nOPMSERVER=com.site24x7.probe.network.startup.MEOpmanagerController" >> /opt/Site24x7OnPremisePoller/conf/modules.conf
fi

# Changes in conf/install.txt
cd /opt/Site24x7OnPremisePoller/conf

Expand Down

0 comments on commit d8f7896

Please sign in to comment.