diff --git a/pretemplate/01-gitea-init b/pretemplate/01-gitea-init index 56e4219..72d9a48 100755 --- a/pretemplate/01-gitea-init +++ b/pretemplate/01-gitea-init @@ -42,25 +42,20 @@ function configure_proxy { function create_app_dir { - if [[ ! -d ${APPDIR} ]] - then - mkdir -p ${APPDIR} - chown ${USER}:${GROUP} ${APPDIR} -R - fi + mkdir -p "${APPDIR}" + chown ${USER}:${GROUP} "${APPDIR}" -R # Create app structure mkdir -p ${APPDIR}/{custom,data,indexers,public,log} chown ${USER}:${GROUP} ${APPDIR}/{data,indexers,log} chmod 750 ${APPDIR}/{data,indexers,log} - mkdir -p ${APPCONFDIR} + mkdir -p "${APPCONFDIR}" chown root:${GROUP} ${APPCONFDIR} - chmod 770 ${APPCONFDIR} + chmod 770 "${APPCONFDIR}" + + mkdir -p "${APPBINDIR}" + chown ${USER}:${GROUP} "${APPBINDIR}" - if [[ ! -d ${APPBINDIR} ]] - then - mkdir -p ${APPBINDIR} - chown ${USER}:${GROUP} ${APPBINDIR} - fi } function create_user_and_group {