Возникли проблемы при выполнении этого сценария sh ... я не вижу в этом ничего плохого, кто-то еще видит что-то, что я облажался?
echo "**************************************"
echo "*** ***"
echo "*** Updated Please Read ***"
echo "*** ***"
echo "**************************************"
sleep 3
echo "Will updating this OS cause any issues with a control panel? [y|n]"
echo " Answer No for Cpanel, Direct Admin, Webmin, Plesk, VZ."
# CP = 'n'
# read CP
# if [[ ! `echo $CP | egrep '(y|yes|n|no)'` ]]; then
#
# echo "Please answer with y or n:"
# read CP
# fi
echo "Testing for SELinux..."
selinuxenabled
if [[ $? = 0 ]]; then
echo "disabling SELinux..."
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
fi
echo "Initial time sync..."
ntpdate -b 204.123.2.72 > /dev/null 2>&1
if [[ -f /etc/redhat-release ]]; then
if [[ `egrep '(4\.[0-9]|\ 5\ |5\.[0-9]|\ 6\.[0-9])' /etc/redhat-release` ]]; then
CENT_VERSION=`cat /etc/redhat-release`
else
echo "This version of CentOS is not compatible with this script."
echo "Please use the old instructions."
exit 1
fi
else
echo "You are not running this script on CentOS."
exit 2
fi
if [[ `echo $CENT_VERSION | grep 4\.[0-9]` ]]; then
V=4
elif [[ `echo $CENT_VERSION | egrep '(\ 5\ |5\.[0-9])'` ]]; then
V=5
fi
echo "Updating Resolvers..."
Получение этой ошибки:
sh harden.sh
: command not found
**************************************
*** ***
*** Updated Please Read ***
*** ***
**************************************
sleep: invalid time interval `3\r'
Try `sleep --help' for more information.
Will updating this OS cause any issues with a control panel? [y|n]
Answer No for Cpanel, Direct Admin, Webmin, Plesk, VZ.
: command not found
: command not found
Testing for SELinux...
: command not found selinuxenabled
: command not found
Кажется, что-то mfunky с форматированием?