Skip to content

Commit

Permalink
Print out distro, if distro is ubuntu or debian, install the dependen…
Browse files Browse the repository at this point in the history
…cies for ES
  • Loading branch information
connortechnology committed Mar 25, 2023
1 parent 5dfc6c8 commit 9aea1eb
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ verify_config() {

echo
echo ----------- Configured Values ----------------------------
echo "Your distro seems to be ${DISTRO}"
echo "Your webserver user seems to be ${WEB_OWNER}"
echo "Your webserver group seems to be ${WEB_GROUP}"
echo "wget is ${WGET}"
Expand Down Expand Up @@ -190,6 +191,16 @@ verify_config() {

# move proc for zmeventnotification.pl
install_es() {
echo '*** Installing ES Dependencies ***'
if [[ "$DISTRO" == "ubuntu" || "$DISTRO" == "debian" ]]; then
echo "$INSTALLER install libcrypt-mysql-perl libcrypt-eksblowfish-perl libmodule-build-perl libyaml-perl libjson-per liblwp-protocol-https-perl libgeos-devl"
$INSTALLER install libcrypt-mysql-perl libcrypt-eksblowfish-perl libmodule-build-perl libyaml-perl
echo "$INSTALLER install libnet-websocket-server-perl"
$INSTALLER install libnet-websocket-server-perl
else
echo "Not ubuntu or debian"
fi

echo '*** Installing ES ***'
mkdir -p "${TARGET_DATA}/push" 2>/dev/null
install -m 755 -o "${WEB_OWNER}" -g "${WEB_GROUP}" zmeventnotification.pl "${TARGET_BIN_ES}" &&
Expand Down Expand Up @@ -603,19 +614,14 @@ check_args() {
# same logic as above
[[ ${INSTALL_HOOK} == 'no' ]] && INSTALL_HOOK_CONFIG='no'
[[ ${INSTALL_HOOK} == 'prompt' && ${INSTALL_HOOK_CONFIG} == 'yes' ]] && INSTALL_HOOK_CONFIG='prompt'


}


###################################################
# script main
###################################################



cmd_args=("$@") # because we need a function to access them
check_args
DISTRO=$(get_distro)
check_root
verify_config
echo
Expand Down

0 comments on commit 9aea1eb

Please sign in to comment.