Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 3802/int/ensure apache conf fro 2.7 is added during migration #92

Merged
merged 5 commits into from
Jul 31, 2013
Merged

Bug 3802/int/ensure apache conf fro 2.7 is added during migration #92

merged 5 commits into from
Jul 31, 2013

Conversation

nperron
Copy link
Contributor

@nperron nperron commented Jul 31, 2013

No description provided.

…roperties into file in argument and permit to add Apache configuration of Rudder 2.7
@nperron
Copy link
Contributor Author

nperron commented Jul 31, 2013

Pull Request Updated !

@nperron
Copy link
Contributor Author

nperron commented Jul 31, 2013

Hmm...no. I have to use a better check for these new parameters

elif [ -d "/etc/httpd/conf.d" ];then
export WWW_DIR="/etc/httpd/conf.d"
else
echo "ERROR: There is not Apache configuration file"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/.../Could not find Apache configuration file

if [ ${CHECK_OLD_API_RESTRICTION} -eq 1 ];then
echo -n "INFO: Remove old API restriction..."
### Remove lines between '# NO access to the API unless you are localhost' and end tag '</Location>'
sed -i "/^[ \t]*# NO access to the API unless you are localhost/,/^[ \t]*<\/Location>/d" ${RUDDER_WWW_CONF}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a risk that this will eat several Location blocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No risk, it will stop at the first

</LocationMatch>
" | perl -p0e "s/\n/\\\n/g" | perl -p0e "s/\t/\\\t/g")
### Use sed to add them at the end but before the end of 'VirtualHost' tag
sed -i "s@^[ \t]*\(</VirtualHost>\)@${NEW_API_CONF_ONELINER}\1@" ${RUDDER_WWW_CONF}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, capture the spaces/tabs for restoring old /VirtualHost line

…he configuration is found and use single quote in order to prevent some evil interpretations
# - 2.7.0 : Apache configuration migration to add link to User Manual
CHECK_USER_MANUAL=$(grep "^\s*Alias /rudder-doc /usr/share/doc/rudder/html\s*$" ${RUDDER_WWW_CONF} | wc -l)
if [ ${CHECK_USER_MANUAL} -ne 1 ];then
echo -n "INFO: Adding User Manual configuration..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I think this isn't very clear. You can't usually configure a User manual. I suggest "Adding Apache alias for User Manual..."

jooooooon added a commit that referenced this pull request Jul 31, 2013
…ro_2.7_is_added_during_migration

Bug 3802/int/ensure apache conf fro 2.7 is added during migration
@jooooooon jooooooon merged commit 93c5dfe into Normation:branches/rudder/2.7 Jul 31, 2013
@nperron nperron deleted the bug_3802/int/ensure_apache_conf_fro_2.7_is_added_during_migration branch July 31, 2013 13:41
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants