mirror of
https://github.com/YunoHost-Apps/snserver_ynh.git
synced 2024-09-03 20:26:22 +02:00
Fix issues during install and upgrade
This commit is contained in:
parent
27521d0eb6
commit
a49dde4c70
4 changed files with 11 additions and 5 deletions
|
@ -14,7 +14,7 @@
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
setup_root=1
|
setup_root=1
|
||||||
setup_nourl=0
|
setup_nourl=0
|
||||||
setup_private=1
|
setup_private=0
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
# 3.22.8~yhn2
|
# 3.22.8~yhn2
|
||||||
|
|
|
@ -319,7 +319,7 @@ if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
# Everyone can access the app.
|
# Everyone can access the app.
|
||||||
# The "main" permission is automatically created before the install script.
|
# The "main" permission is automatically created before the install script.
|
||||||
ynh_permission_update --permission="main" --add="visitors"
|
ynh_permission_update --permission="main" --add="visitors" --show_tile="false"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -253,7 +253,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
# Remove all files if the old syncing-server is used
|
# Remove all files if the old syncing-server is used
|
||||||
if [[ ! $standalone ]];
|
if [[ ! $standalone ]];
|
||||||
then
|
then
|
||||||
ynh_secure_remove --file="$final_path/*"
|
ynh_secure_remove --file="$final_path"
|
||||||
ynh_secure_remove --file="/var/log/$app"
|
ynh_secure_remove --file="/var/log/$app"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ then
|
||||||
ynh_secure_remove --file="$config_api_gateway"
|
ynh_secure_remove --file="$config_api_gateway"
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
mkdir -p "$final_path/live"
|
mkdir -p "$final_path/live"
|
||||||
ynh_setup_source --source_id=app_api_gateway --dest_dir="$final_path/live/api-gateway"
|
ynh_setup_source --source_id=app_api-gateway --dest_dir="$final_path/live/api-gateway"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$extensions_version_installed" < "$extensions_version" ]]
|
if [[ "$extensions_version_installed" < "$extensions_version" ]]
|
||||||
|
@ -311,6 +311,12 @@ then
|
||||||
then
|
then
|
||||||
cp -a "../sources/extra_files/extensions/." "$final_path_extensions"
|
cp -a "../sources/extra_files/extensions/." "$final_path_extensions"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
find "../conf/" -name "ext_*.src" -print0 | while read -d $'\0' file
|
||||||
|
do
|
||||||
|
basename=$(basename -as .src $file)
|
||||||
|
ynh_setup_source --dest_dir="$final_path_extensions/src/${basename#'ext_'}" --source_id="$basename"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
|
|
|
@ -297,7 +297,7 @@ ynh_cleanup_ruby () {
|
||||||
if [[ ! $required_ruby_versions ]]
|
if [[ ! $required_ruby_versions ]]
|
||||||
then
|
then
|
||||||
# Remove rbenv environment configuration
|
# Remove rbenv environment configuration
|
||||||
ynh_print_info --message="Removing of rbenv-$rbenv_version"
|
ynh_print_info --message="Removing of rbenv"
|
||||||
ynh_secure_remove --file="$rbenv_install_dir"
|
ynh_secure_remove --file="$rbenv_install_dir"
|
||||||
ynh_secure_remove --file="/etc/profile.d/rbenv.sh"
|
ynh_secure_remove --file="/etc/profile.d/rbenv.sh"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue