Commit 2b242d4d authored by Benoît's avatar Benoît
Browse files

Updated to support browser language detection for apple.xml

parent fb9a154c
...@@ -51,7 +51,9 @@ autodiscoverhtaccess="${autodiscoverpath}/.htaccess" ...@@ -51,7 +51,9 @@ autodiscoverhtaccess="${autodiscoverpath}/.htaccess"
# Apple configurator paths # Apple configurator paths
applepath="${defaulthostingdir}/mail" applepath="${defaulthostingdir}/mail"
applewebpagepath="${applepath}/apple.xml" applewebpagepath="${applepath}/apple.xml"
applemobileconfpathfile="${autodiscoverpath}/apple.mobileconfig" appleformfrpath="${applepath}/apple_fr.html"
appleformenpath="${applepath}/apple_en.html"
applemobileconfpathfile="${applepath}/apple.mobileconfig"
appleweblogo="logo.png" appleweblogo="logo.png"
appleweblogourl="${gitrawfullurl}/${appleweblogo}" appleweblogourl="${gitrawfullurl}/${appleweblogo}"
...@@ -210,14 +212,9 @@ echo "" ...@@ -210,14 +212,9 @@ echo ""
fn_logecho "[ INFO ] Writing Apple config files" fn_logecho "[ INFO ] Writing Apple config files"
echo "" echo ""
sleep 0.5 sleep 0.5
if [ ${applewebpagelanguage} = fr ]; then curl "${gitrawfullurl}/apple.xml" > "${applewebpagepath}"
curl "${gitrawfullurl}/apple_fr.xml" > "${applewebpagepath}" curl "${gitrawfullurl}/apple_fr.html" > "${appleformfrpath}"
elif [ ${applewebpagelanguage} = en ]; then curl "${gitrawfullurl}/apple_en.html" > "${appleformenpath}"
curl "${gitrawfullurl}/apple_en.xml" > "${applewebpagepath}"
else
fn_logecho "[ Warning ] Selected language ${applewebpagelanguage} is not available. Reverting to english."
curl "${gitrawfullurl}/apple_en.xml" > "${applewebpagepath}"
fi
curl "${gitrawfullurl}/apple.mobileconfig" > "${applemobileconfpathfile}" curl "${gitrawfullurl}/apple.mobileconfig" > "${applemobileconfpathfile}"
# Apple web page Logo # Apple web page Logo
...@@ -227,8 +224,10 @@ wget -O "${applepath}/${appleweblogo}" "${appleweblogourl}" ...@@ -227,8 +224,10 @@ wget -O "${applepath}/${appleweblogo}" "${appleweblogourl}"
# Apple Settings # Apple Settings
fn_logecho "[ ... ] Populating Apple config files" fn_logecho "[ ... ] Populating Apple config files"
sleep 0.5 sleep 0.5
sed -i -e "s/APPLELOGO/${appleweblogo}/g" "${applewebpagepath}" sed -i -e "s/APPLELOGO/${appleweblogo}/g" "${appleformfrpath}"
sed -i -e "s/COMPANYNAME/${companyname}/g" "${applewebpagepath}" sed -i -e "s/COMPANYNAME/${companyname}/g" "${appleformfrpath}"
sed -i -e "s/APPLELOGO/${appleweblogo}/g" "${appleformenpath}"
sed -i -e "s/COMPANYNAME/${companyname}/g" "${appleformenpath}"
sed -i -e "s/HOSTNAME/${hostname}/g" "${applemobileconfpathfile}" sed -i -e "s/HOSTNAME/${hostname}/g" "${applemobileconfpathfile}"
sed -i -e "s/COMPANYLOWERCASENAME/${companylowercasename}/g" "${applemobileconfpathfile}" sed -i -e "s/COMPANYLOWERCASENAME/${companylowercasename}/g" "${applemobileconfpathfile}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment