-
Notifications
You must be signed in to change notification settings - Fork 24
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
Bug 3802/int/ensure apache conf fro 2.7 is added during migration #92
Conversation
…roperties into file in argument and permit to add Apache configuration of Rudder 2.7
Pull Request Updated ! |
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" |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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..." |
There was a problem hiding this comment.
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..."
…ro_2.7_is_added_during_migration Bug 3802/int/ensure apache conf fro 2.7 is added during migration
No description provided.