make compass install robust
Change-Id: Iab71a2df4c1bb16bd7d60d149bd86bcbac2d4511
This commit is contained in:
parent
f932d2d129
commit
94b6c5db2d
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,6 +9,9 @@
|
||||
# log extensions
|
||||
*.log
|
||||
|
||||
# temp files
|
||||
install/env.sh
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
|
@ -37,7 +37,6 @@ sudo chef-server-ctl reconfigure
|
||||
sudo chef-server-ctl test
|
||||
if [[ "$?" != "0" ]]; then
|
||||
echo "chef-server-ctl test failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "configure chef client and knife"
|
||||
|
@ -143,6 +143,13 @@ fi
|
||||
echo "disable selinux temporarily"
|
||||
echo 0 > /selinux/enforce
|
||||
|
||||
# make log dir
|
||||
mkdir -p /var/log/cobbler
|
||||
mkdir -p /var/log/cobbler/tasks
|
||||
mkdir -p /var/log/cobbler/anamon
|
||||
chmod -R 777 /var/log/cobbler
|
||||
|
||||
|
||||
sudo service httpd restart
|
||||
sudo service cobblerd restart
|
||||
sudo cobbler get-loaders
|
||||
|
@ -154,6 +154,7 @@ else
|
||||
echo "compass-progress-updated has already started"
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
compass check
|
||||
if [[ "$?" != "0" ]]; then
|
||||
echo "compass check failed"
|
||||
|
@ -76,6 +76,8 @@ sudo sed -i "s/acl localnet src \$subnet/acl localnet src $subnet_escaped/g" /et
|
||||
sudo chmod 644 /etc/squid/squid.conf
|
||||
sudo mkdir -p /var/squid/cache
|
||||
sudo chown -R squid:squid /var/squid
|
||||
sudo mkdir /var/log/squid
|
||||
sudo chmod -R 777 /var/log/squid
|
||||
sudo service squid restart
|
||||
sudo service squid status
|
||||
if [[ "$?" != "0" ]]; then
|
||||
@ -85,9 +87,30 @@ else
|
||||
echo "squid conf is updated"
|
||||
fi
|
||||
|
||||
mkdir -p /var/log/httpd
|
||||
chmod -R 777 /var/log/httpd
|
||||
|
||||
mkdir -p /var/log/mysql
|
||||
chmod -R 777 /var/log/mysql
|
||||
sudo service httpd restart
|
||||
sudo service httpd status
|
||||
if [[ "$?" != "0" ]]; then
|
||||
echo "squid is not started"
|
||||
exit 1
|
||||
else
|
||||
echo "squid conf is updated"
|
||||
fi
|
||||
|
||||
#update mysqld
|
||||
echo "update mysqld"
|
||||
sudo service mysqld restart
|
||||
sudo service mysqld status
|
||||
if [[ "$?" != "0" ]]; then
|
||||
echo "failed to restart mysqld"
|
||||
exit 1
|
||||
else
|
||||
echo "mysqld restarted"
|
||||
fi
|
||||
MYSQL_USER=${MYSQL_USER:-root}
|
||||
MYSQL_OLD_PASSWORD=${MYSQL_OLD_PASSWORD:-root}
|
||||
MYSQL_PASSWORD=${MYSQL_PASSWORD:-root}
|
||||
@ -105,15 +128,15 @@ if [[ "$?" != "0" ]]; then
|
||||
echo "mysql password set failed"
|
||||
exit 1
|
||||
else
|
||||
echo "mysql password set successful"
|
||||
echo "mysql password set succeeded"
|
||||
fi
|
||||
sudo mysql -h${MYSQL_SERVER} --port=${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} -e "drop database ${MYSQL_DATABASE}"
|
||||
sudo mysql -h${MYSQL_SERVER} --port=${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD} -e "create database ${MYSQL_DATABASE}"
|
||||
if [[ "$?" != "0" ]]; then
|
||||
echo "mysql database set fails"
|
||||
echo "mysql database set failed"
|
||||
exit 1
|
||||
else
|
||||
echo "mysql database set succeeds"
|
||||
echo "mysql database set succeeded"
|
||||
fi
|
||||
sudo service mysqld restart
|
||||
sudo service mysqld status
|
||||
@ -121,7 +144,7 @@ if [[ "$?" != "0" ]]; then
|
||||
echo "mysqld is not started"
|
||||
exit 1
|
||||
else
|
||||
echo "mysqld conf is updated"
|
||||
echo "mysqld is started"
|
||||
fi
|
||||
|
||||
cd $SCRIPT_DIR
|
||||
|
Loading…
x
Reference in New Issue
Block a user