Changeset 3091
- Timestamp:
- 10/07/11 16:07:03 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
alternc/branches/stable-1.0/src/functions_hosting.sh
r3087 r3091 84 84 cp "$TEMPLATE" "$TMP_FILE" 85 85 86 # Substitute special characters : 87 FQDN2="`echo $FQDN | sed -e 's/\\\\/\\\\\\\\/g' -e 's/#/\\\\#/g' -e 's/&/\\\\\\&/g'`" 88 DOCUMENT_ROOT2="`echo $DOCUMENT_ROOT | sed -e 's/\\\\/\\\\\\\\/g' -e 's/#/\\\\#/g' -e 's/&/\\\\\\&/g'`" 89 ACCOUNT_ROOT2="`echo $ACCOUNT_ROOT | sed -e 's/\\\\/\\\\\\\\/g' -e 's/#/\\\\#/g' -e 's/&/\\\\\\&/g'`" 90 REDIRECT2="`echo $REDIRECT | sed -e 's/\\\\/\\\\\\\\/g' -e 's/#/\\\\#/g' -e 's/&/\\\\\\&/g'`" 91 86 92 # Put the good value in the conf file 87 93 sed -i \ 88 -e "s#%%fqdn%%#$FQDN #g" \89 -e "s#%%document_root%%#$DOCUMENT_ROOT #g" \90 -e "s#%%account_root%%#$ACCOUNT_ROOT #g" \91 -e "s#%%redirect%%#$REDIRECT #g" \94 -e "s#%%fqdn%%#$FQDN2#g" \ 95 -e "s#%%document_root%%#$DOCUMENT_ROOT2#g" \ 96 -e "s#%%account_root%%#$ACCOUNT_ROOT2#g" \ 97 -e "s#%%redirect%%#$REDIRECT2#g" \ 92 98 $TMP_FILE 93 99 94 100 # Check if all is right in the conf file 95 101 # If not, put a debug message 96 local ISNOTGOOD=$(grep "%%" "$TMP_FILE") 97 [ "$ISNOTGOOD" ] && (echo "# There was a probleme in the generation : $ISNOTGOOD" > "$TMP_FILE" ; return 44 ) 102 # NO : redirect and document_root COULD contains legitimate %% expressions (...) 103 # local ISNOTGOOD=$(grep "%%" "$TMP_FILE") 104 # [ "$ISNOTGOOD" ] && (echo "# There was a probleme in the generation : $ISNOTGOOD" > "$TMP_FILE" ; return 44 ) 98 105 99 106 # Put the conf file in prod
Note: See TracChangeset
for help on using the changeset viewer.
