- --- a/scripts/setup-seafile-mysql.py
- +++ b/scripts/setup-seafile-mysql.py
- @@ -1203,7 +1203,7 @@ USER_STRONG_PASSWORD_REQUIRED = True
-
- try:
- media_dir = os.path.join(env_mgr.install_path, 'seahub', 'media')
- - orig_avatar_dir = os.path.join(media_dir, 'avatars')
- + orig_avatar_dir = os.path.join(media_dir, 'avatars_default')
-
- seahub_data_dir = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', env_mgr.top_dir), 'seahub-data')
- dest_avatar_dir = os.path.join(seahub_data_dir, 'avatars')
- @@ -1214,8 +1214,8 @@ USER_STRONG_PASSWORD_REQUIRED = True
- if not os.path.exists(seahub_data_dir):
- os.mkdir(seahub_data_dir)
-
- - shutil.move(orig_avatar_dir, dest_avatar_dir)
- - os.symlink(dest_avatar_dir, orig_avatar_dir)
- + shutil.copytree(orig_avatar_dir, dest_avatar_dir)
- + os.symlink(dest_avatar_dir, os.path.join(media_dir, 'avatars'))
- except Exception as e:
- Utils.error('Failed to prepare seahub avatars dir: %s' % e)
-
- --- a/scripts/setup-seafile.sh
- +++ b/scripts/setup-seafile.sh
- @@ -676,12 +676,12 @@ echo "Done."
- # prepare avatar folder
-
- media_dir=${INSTALLPATH}/seahub/media
- -orig_avatar_dir=${INSTALLPATH}/seahub/media/avatars
- +orig_avatar_dir=${INSTALLPATH}/seahub/media/avatars_default
- dest_avatar_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data/avatars
-
- if [[ ! -d ${dest_avatar_dir} ]]; then
- mkdir -p "${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data"
- - mv "${orig_avatar_dir}" "${dest_avatar_dir}"
- + cp -pr "${orig_avatar_dir}" "${dest_avatar_dir}"
- ln -s ${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data/avatars ${media_dir}
- fi
-
|