File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
33PYCACHE=__pycache__
4- MY_HOME=/c/Users/Ibrahim/Desktop
5- SHOW_FINDING= ` find . -type d -name " ${PYCACHE} " 2> /dev/null`
4+ MY_HOME=/c/Users/$USER
5+ LIST_FINDINGS= ` cd $MY_HOME && $ find . -type d -name " ${PYCACHE} " 2> /dev/null`
66TIMESTAMP=` date ' +%F %T' `
77
8- for RESULT in " ${SHOW_FINDING } " ; do
8+ for RESULT in " ${LIST_FINDINGS } " ; do
99 echo " #############################"
1010 echo " Result found: $RESULT "
1111 echo " #############################"
1212done
1313
1414cd $MY_HOME
1515
16- if [ -z " ${SHOW_FINDING } " ]; then
16+ if [ -z " ${LIST_FINDINGS } " ]; then
1717 echo " ${TIMESTAMP} INFO No ${PYCACHE} found."
1818 read
1919 exit 2
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ echo "${TIMESTAMP} WARN Stop filebeat and metricbeat on all nodes with operat
3333read -p ' Enter the APITOKEN: ' APITOKEN
3434read -p ' Enter desired filebeat & metricbeat version: ' VERSION_BEATS
3535
36- curl -H X-JFrog-Art-Api:${APITOKEN} -O -s " https://artifactory.$MASK /elastic/${VERSION_BEATS} /filebeat-${VERSION_BEATS} -x86_64.rpm" # masking the domain regarding security.
37- curl -H X-JFrog-Art-Api:${APITOKEN} -O -s " https://artifactory.$MASK /elastic/${VERSION_BEATS} /metricbeat-${VERSION_BEATS} -x86_64.rpm" # masking the domain regarding security.
36+ curl -H X-JFrog-Art-Api:${APITOKEN} -O -s " https://artifactory.$MASKED /elastic/${VERSION_BEATS} /filebeat-${VERSION_BEATS} -x86_64.rpm" # masking the domain regarding security.
37+ curl -H X-JFrog-Art-Api:${APITOKEN} -O -s " https://artifactory.$MASKED /elastic/${VERSION_BEATS} /metricbeat-${VERSION_BEATS} -x86_64.rpm" # masking the domain regarding security.
3838
3939if [ $( ls " $BEATS_SETUP " | wc -l) -ne 0 ]; then
4040 echo " ${TIMESTAMP} INFO filebeat-${VERSION_BEATS} and metricbeat-${VERSION_BEATS} downloads completed." | tee -a ${LOGFILE}
Original file line number Diff line number Diff line change 33# This script displays the open network ports on a system
44# Use -4 as an argument to limit to tcpv4 ports.
55
6- netstat -nutl ${1} | grep ' :' | awk ' {print $4}' | awk -F ' :' ' {print $NF}'
6+ netstat -nutl ${1} | grep ' :' | awk ' {print $4}' | awk -F ' :' ' {print $NF}' | uniq
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ echo "${TIMESTAMP} WARN Stop filebeat and metricbeat on all nodes with operat
3030read -p ' Enter filebeat & metricbeat version: ' VERSION_BEATS
3131
3232function downloadElk {
33- wget " https://artifactory.wdt.six-group.net :443/artifactory/cscao-generic-release-remote-cache/docker/elk_${VERSION_BEATS} .tar.gz"
33+ wget " https://artifactory.${BASE_MASKED} :443/artifactory/cscao-generic-release-remote-cache/docker/elk_${VERSION_BEATS} .tar.gz"
3434 gzip -d elk_${VERSION_BEATS} .tar.gz
3535
3636 if [ $( ls -l " $OPT_SETUP " | wc -l) -ne 0 ]; then
You can’t perform that action at this time.
0 commit comments