Created
August 23, 2018 10:39
-
-
Save search5/7601e3b6ddd65a091c2c384984f97ac3 to your computer and use it in GitHub Desktop.
Confluence 한글 폰트 설치 스크립트(남이 만든거 약간 더 개선했습니다)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$#" -lt 1 ]; then | |
echo -e "$# is Illegal number of parameters.\n" | |
echo -e "Usage: $0 confluence-installed-dir\n" | |
echo "Example: $0 /opt/atlassian/confluence" | |
exit 1 | |
fi | |
CONF_DIR=$1 | |
if [ ! -f "${CONF_DIR}/bin/setenv.sh" ]; then | |
echo "${CONF_DIR}/bin/setenv.sh does not exist.!"; | |
exit 1; | |
fi | |
sudo apt-get install fontconfig | |
JAVA_HOME=$0 | |
SETENV_SH=${CONF_DIR}/bin/setenv.sh | |
## create fallback font dir | |
FONT_DIR=${JAVA_HOME}/jre/lib/fonts/fallback | |
mkdir -p ${FONT_DIR} | |
## download nanum font | |
curl -o nanumfont.zip http://cdn.naver.com/naver/NanumFont/fontfiles/NanumFont_TTF_ALL.zip | |
## extract to font dir | |
unzip nanumfont.zip -d ${FONT_DIR} | |
ln -s ${FONT_DIR} /usr/share/fonts/nanum | |
fc-cache | |
## append JVM paramter | |
echo "### See https://jira.atlassian.com/browse/CONFSERVER-36557 " >> ${SETENV_SH} | |
echo "CATALINA_OPTS=\"-Dconfluence.document.conversion.fontpath=${JAVA_HOME}/jre/lib/fonts/fallback \${CATALINA_OPTS}\"" >> ${SETENV_SH} | |
echo "CATALINA_OPTS=\"-Dconfluence.document.conversion.words.defaultfontname=NanumGothic \${CATALINA_OPTS}\"" >> ${SETENV_SH} | |
echo "CATALINA_OPTS=\"-Dconfluence.document.conversion.slides.defaultfontname.regular=NanumGothic \${CATALINA_OPTS}\"" >> ${SETENV_SH} | |
echo "CATALINA_OPTS=\"-Dconfluence.document.conversion.slides.defaultfontname.asian=NanumGothic \${CATALINA_OPTS}\"" >> ${SETENV_SH} | |
echo "CATALINA_OPTS=\"-Dconfluence.document.conversion.slides.defaultfontname.symbol=NanumGothic \${CATALINA_OPTS}\"" >> ${SETENV_SH} | |
echo "CATALINA_OPTS=\"-Dfile.encoding=utf-8 \${CATALINA_OPTS}\"" >> ${SETENV_SH} | |
echo "export CATALINA_OPTS" >> ${SETENV_SH} | |
##· | |
echo "You need to restart Confluence!!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment