Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
HaiSoft (public)
Plesk - Mail Autoconfig
Commits
2b242d4d
Commit
2b242d4d
authored
Jun 19, 2018
by
Benoît
Browse files
Updated to support browser language detection for apple.xml
parent
fb9a154c
Changes
1
Hide whitespace changes
Inline
Side-by-side
plesk_mail_autoconfig.sh
View file @
2b242d4d
...
...
@@ -51,7 +51,9 @@ autodiscoverhtaccess="${autodiscoverpath}/.htaccess"
# Apple configurator paths
applepath
=
"
${
defaulthostingdir
}
/mail"
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"
appleweblogourl
=
"
${
gitrawfullurl
}
/
${
appleweblogo
}
"
...
...
@@ -210,14 +212,9 @@ echo ""
fn_logecho
"[ INFO ] Writing Apple config files"
echo
""
sleep
0.5
if
[
${
applewebpagelanguage
}
=
fr
]
;
then
curl
"
${
gitrawfullurl
}
/apple_fr.xml"
>
"
${
applewebpagepath
}
"
elif
[
${
applewebpagelanguage
}
=
en
]
;
then
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.xml"
>
"
${
applewebpagepath
}
"
curl
"
${
gitrawfullurl
}
/apple_fr.html"
>
"
${
appleformfrpath
}
"
curl
"
${
gitrawfullurl
}
/apple_en.html"
>
"
${
appleformenpath
}
"
curl
"
${
gitrawfullurl
}
/apple.mobileconfig"
>
"
${
applemobileconfpathfile
}
"
# Apple web page Logo
...
...
@@ -227,8 +224,10 @@ wget -O "${applepath}/${appleweblogo}" "${appleweblogourl}"
# Apple Settings
fn_logecho
"[ ... ] Populating Apple config files"
sleep
0.5
sed
-i
-e
"s/APPLELOGO/
${
appleweblogo
}
/g"
"
${
applewebpagepath
}
"
sed
-i
-e
"s/COMPANYNAME/
${
companyname
}
/g"
"
${
applewebpagepath
}
"
sed
-i
-e
"s/APPLELOGO/
${
appleweblogo
}
/g"
"
${
appleformfrpath
}
"
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/COMPANYLOWERCASENAME/
${
companylowercasename
}
/g"
"
${
applemobileconfpathfile
}
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment