copy_puppet_logs.sh: fix bash conditionnal to test apache directory

This bash error makes the publisher failing:
cp: cannot stat ‘/var/log/apache2’: No such file or directory

So the script stops here and logs can't be scp because the rest of the
script can't be executed so logs have wrong permissions.

Change-Id: I25fc65ee4bb5b6a96af6cb9a62839d805ad40c26
This commit is contained in:
Emilien Macchi 2015-08-09 00:20:14 -04:00
parent 26f2289d58
commit af1f854dc4

@ -103,12 +103,12 @@ sudo cp /etc/sudoers $LOG_DIR/sudoers.txt
# apache logs; including wsgi stuff like horizon, keystone, etc.
if uses_debs; then
apache_logs=/var/log/apache2
if [[ -d /etc/apache2/sites-enabled ]]; then
if [ -d /etc/apache2/sites-enabled ]; then
sudo cp /etc/apache2/sites-enabled/* $LOG_DIR/apache_config
fi
elif is_fedora; then
apache_logs=/var/log/httpd
if [[ -d /etc/apache2/httpd/conf.d ]]; then
if [ -d /etc/apache2/httpd/conf.d ]; then
sudo cp /etc/httpd/conf.d/* $LOG_DIR/apache_config
fi
fi