Skip to content

Commit

Permalink
Amazon Linux AMI version check
Browse files Browse the repository at this point in the history
  • Loading branch information
centminmod committed Dec 1, 2016
1 parent 225f747 commit 9080e5f
Show file tree
Hide file tree
Showing 37 changed files with 149 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Extras/axivo_install.sh
Expand Up @@ -29,6 +29,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

# Setup Colours
black='\E[30;40m'
red='\E[31;40m'
Expand Down
6 changes: 5 additions & 1 deletion addons/acmetool.sh
Expand Up @@ -4,7 +4,7 @@
###############################################################
# variables
###############################################################
ACMEVER='1.0.18'
ACMEVER='1.0.19'
DT=$(date +"%d%m%y-%H%M%S")
ACMEDEBUG='n'
ACMEDEBUG_LOG='y'
Expand Down Expand Up @@ -116,6 +116,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ ! -d "$DIR_TMP" ]; then
mkdir -p "$DIR_TMP"
fi
Expand Down
4 changes: 4 additions & 0 deletions addons/customcurl.sh
Expand Up @@ -36,6 +36,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ ! -d "$DIR_TMP" ]; then
mkdir -p "$DIR_TMP"
chmod 0750 "$DIR_TMP"
Expand Down
4 changes: 4 additions & 0 deletions addons/devtoolset-4.sh
Expand Up @@ -67,6 +67,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ ! -d "$CENTMINLOGDIR" ]; then
mkdir -p "$CENTMINLOGDIR"
fi
Expand Down
4 changes: 4 additions & 0 deletions addons/git2_install.sh
Expand Up @@ -27,6 +27,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
CENTOSVER=$(cat /etc/redhat-release | awk '{ print $7 }')
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi
###########################################################
# Setup Colours
black='\E[30;40m'
Expand Down
4 changes: 4 additions & 0 deletions addons/golang.sh
Expand Up @@ -71,6 +71,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

go_install() {
cd $DIR_TMP

Expand Down
4 changes: 4 additions & 0 deletions addons/ius-repo.sh
Expand Up @@ -52,6 +52,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
CENTOSVER=$(cat /etc/redhat-release | awk '{ print $7 }')
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi
###########################################################
# Setup Colours
black='\E[30;40m'
Expand Down
4 changes: 4 additions & 0 deletions addons/nodejs.sh
Expand Up @@ -68,6 +68,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions addons/passenger.sh
Expand Up @@ -72,6 +72,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions addons/python27_install.sh
Expand Up @@ -59,6 +59,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [[ "$CENTOS_SEVEN" = '7' ]]; then
echo
echo "detected CentOS 7.x OS, python 2.7 is already"
Expand Down
4 changes: 4 additions & 0 deletions addons/python34_install.sh
Expand Up @@ -58,6 +58,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
CENTOSVER=$(cat /etc/redhat-release | awk '{ print $7 }')
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi
###########################################################
# Setup Colours
black='\E[30;40m'
Expand Down
4 changes: 4 additions & 0 deletions addons/rclone.sh
Expand Up @@ -56,6 +56,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions addons/wget.sh
Expand Up @@ -42,6 +42,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions centmin.sh
Expand Up @@ -145,6 +145,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

source "inc/centos_seven.inc"
seven_function

Expand Down
4 changes: 4 additions & 0 deletions installer-gitlab.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer-latest-gitlab.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer-latest.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer-minimal-gitlab.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer-minimal.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer-ngxpagespeed-gitlab.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer-ngxpagespeed.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer55-gitlab.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer55.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer56-gitlab.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer56.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer7-gitlab.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions installer7.sh
Expand Up @@ -91,6 +91,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions tools/auditd.sh
Expand Up @@ -47,6 +47,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f "/etc/centminmod/custom_config.inc" ]; then
# default is at /etc/centminmod/custom_config.inc
. "/etc/centminmod/custom_config.inc"
Expand Down
4 changes: 4 additions & 0 deletions tools/cminfo.sh
Expand Up @@ -35,6 +35,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ ! -f /usr/sbin/virt-what ]; then
yum -y -q install virt-what
fi
Expand Down
4 changes: 4 additions & 0 deletions tools/csf-reinstall.sh
Expand Up @@ -121,6 +121,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f /proc/user_beancounters ]; then
# CPUS='1'
# MAKETHREADS=" -j$CPUS"
Expand Down
4 changes: 4 additions & 0 deletions tools/imagemagick-update.sh
Expand Up @@ -37,6 +37,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ ! -d "$CENTMINLOGDIR" ]; then
mkdir -p "$CENTMINLOGDIR"
fi
Expand Down
4 changes: 4 additions & 0 deletions tools/nano-syntax.sh
Expand Up @@ -28,6 +28,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ -f "/etc/centminmod/custom_config.inc" ]; then
# default is at /etc/centminmod/custom_config.inc
. "/etc/centminmod/custom_config.inc"
Expand Down
4 changes: 4 additions & 0 deletions tools/nginxupdate.sh
Expand Up @@ -57,6 +57,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

if [ ! -d "$CENTMINLOGDIR" ]; then
mkdir -p "$CENTMINLOGDIR"
fi
Expand Down
4 changes: 4 additions & 0 deletions tools/nv.sh
Expand Up @@ -228,6 +228,10 @@ if [ "$CENTOSVER" == 'Enterprise' ]; then
OLS='y'
fi

if [[ -f /etc/system-release && "$(awk '{print $1,$2,$3}' /etc/system-release)" = 'Amazon Linux AMI' ]]; then
CENTOS_SIX='6'
fi

cmservice() {
servicename=$1
action=$2
Expand Down

0 comments on commit 9080e5f

Please sign in to comment.