1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/discourse_ynh.git synced 2024-09-03 18:26:18 +02:00

Spacing normalization

This commit is contained in:
yalh76 2021-03-07 01:47:27 +01:00
parent c5aaef69e5
commit 111d8899b1
4 changed files with 34 additions and 34 deletions

View file

@ -104,11 +104,11 @@ fi
# Change the domain for NGINX
if [ $change_domain -eq 1 ]
then
# Delete file checksum for the old conf file location
ynh_delete_file_checksum --file="$nginx_conf_path"
mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
# Store file checksum for the new config file location
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
# Delete file checksum for the old conf file location
ynh_delete_file_checksum --file="$nginx_conf_path"
mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
# Store file checksum for the new config file location
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
fi
#=================================================

View file

@ -43,8 +43,8 @@ test ! -e "$final_path" || ynh_die --message="This path already contains a folde
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ]; then
# Check memory requirements
check_memory_requirements
# Check memory requirements
check_memory_requirements
fi
#=================================================
@ -88,11 +88,11 @@ ynh_script_progression --message="Setting up source files..."
# Specific actions on ARM architecture
if [ -n "$(uname -m | grep arm)" ] ; then
# Unapply commit cf9b4a789b855b5199e98a13424e409854a8e848 that breaks ARM
# compatibility by pointing to a recent libv8 version
# This is due to this libv8 issue (https://github.com/cowboyd/libv8/issues/261)
# that prevents it from being compiled on ARM hence no binary gem is available yet
cp ../sources/patches_arm/* ../sources/patches
# Unapply commit cf9b4a789b855b5199e98a13424e409854a8e848 that breaks ARM
# compatibility by pointing to a recent libv8 version
# This is due to this libv8 issue (https://github.com/cowboyd/libv8/issues/261)
# that prevents it from being compiled on ARM hence no binary gem is available yet
cp ../sources/patches_arm/* ../sources/patches
fi
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
@ -120,7 +120,7 @@ ynh_add_nginx_config
# Reference: https://meta.discourse.org/t/subfolder-support-with-docker/30507?u=falco&source_topic_id=54191
if [ "$path_url" != "/" ] ; then
ynh_replace_string --match_string='$proxy_add_x_forwarded_for' --replace_string='$http_your_original_ip_header' --target_file="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_replace_string --match_string='$proxy_add_x_forwarded_for' --replace_string='$http_your_original_ip_header' --target_file="/etc/nginx/conf.d/$domain.d/$app.conf"
fi
ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -199,17 +199,17 @@ ynh_store_file_checksum --file="$final_path/config/secrets.yml"
chown -R $app: $final_path
pushd "$final_path"
# Install bundler, a gems installer
gem install bundler
# Install without documentation
exec_as $app echo "gem: --no-ri --no-rdoc" >> "$final_path/.gemrc"
# Install bundler, a gems installer
gem install bundler
# Install without documentation
exec_as $app echo "gem: --no-ri --no-rdoc" >> "$final_path/.gemrc"
popd
# Specific actions on ARM architecture
if [ -n "$(uname -m | grep arm)" ] ; then
# Define the platform specifically to retrieve binaries
# for libv8 because it currently doesn't compile on ARM devices
exec_login_as $app bundle config specific_platform arm-linux
# Define the platform specifically to retrieve binaries
# for libv8 because it currently doesn't compile on ARM devices
exec_login_as $app bundle config specific_platform arm-linux
fi
# Install dependencies
@ -220,9 +220,9 @@ exec_login_as $app MAKEFLAGS=-j2 bundle install --jobs 2
# On ARM architecture, replace bundled libpsl by system native libpsl
# because the provided binary isn't compatible
if [ -n "$(uname -m | grep arm)" ] ; then
(cd $final_path/vendor/bundle/ruby/*/gems/mini_suffix-*/vendor
rm libpsl.so
ln -s $(ldconfig -p | grep libpsl | awk 'END {print $NF}') libpsl.so)
(cd $final_path/vendor/bundle/ruby/*/gems/mini_suffix-*/vendor
rm libpsl.so
ln -s $(ldconfig -p | grep libpsl | awk 'END {print $NF}') libpsl.so)
fi
#=================================================

View file

@ -45,8 +45,8 @@ test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 0 ]; then
# Check memory requirements
check_memory_requirements
# Check memory requirements
check_memory_requirements
fi
#=================================================

View file

@ -167,7 +167,7 @@ ynh_add_nginx_config
# Reference: https://meta.discourse.org/t/subfolder-support-with-docker/30507?u=falco&source_topic_id=54191
if [ "$path_url" != "/" ] ; then
ynh_replace_string --match_string='$proxy_add_x_forwarded_for' --replace_string='$http_your_original_ip_header' --target_file="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_replace_string --match_string='$proxy_add_x_forwarded_for' --replace_string='$http_your_original_ip_header' --target_file="/etc/nginx/conf.d/$domain.d/$app.conf"
fi
ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -288,9 +288,9 @@ then
)
# Specific actions on ARM architecture
if [ -n "$(uname -m | grep arm)" ] ; then
# Define the platform specifically to retrieve binaries
# for libv8 because it currently doesn't compile on ARM devices
exec_login_as $app bundle config specific_platform arm-linux
# Define the platform specifically to retrieve binaries
# for libv8 because it currently doesn't compile on ARM devices
exec_login_as $app bundle config specific_platform arm-linux
fi
# Install dependencies
exec_login_as $app bundle config set path 'vendor/bundle'
@ -300,11 +300,11 @@ then
# On ARM architecture, replace bundled libpsl by system native libpsl
# because the provided binary isn't compatible
if [ -n "$(uname -m | grep arm)" ] ; then
(
cd $final_path/vendor/bundle/ruby/*/gems/mini_suffix-*/vendor
rm libpsl.so
ln -s $(ldconfig -p | grep libpsl | awk 'END {print $NF}') libpsl.so
)
(
cd $final_path/vendor/bundle/ruby/*/gems/mini_suffix-*/vendor
rm libpsl.so
ln -s $(ldconfig -p | grep libpsl | awk 'END {print $NF}') libpsl.so
)
fi
fi