1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pleroma_ynh.git synced 2024-09-03 20:15:59 +02:00

Apply example_ynh

This commit is contained in:
yalh76 2021-02-26 02:59:28 +01:00
parent 7daa14c7b5
commit 122bb63ebe
3 changed files with 7 additions and 13 deletions

View file

@ -1,2 +1,2 @@
proxy_cache_path /tmp/{APP}-media-cache levels=1:2 keys_zone={APP}_media_cache:10m max_size=__SIZE__
proxy_cache_path /tmp/__APP__-media-cache levels=1:2 keys_zone=__APP___media_cache:10m max_size=__SIZE__
inactive=720m use_temp_path=off;

View file

@ -126,12 +126,9 @@ ynh_add_nginx_config
if [ $cache -eq 1 ]
then
cp -rf "../conf/cache.conf" "/etc/nginx/conf.d/$app-cache.conf"
ynh_replace_string --match_string="{APP}" --replace_string="$app" --target_file="/etc/nginx/conf.d/$app-cache.conf"
ynh_replace_string --match_string="__SIZE__" --replace_string="$size" --target_file="/etc/nginx/conf.d/$app-cache.conf"
ynh_store_file_checksum --file="/etc/nginx/conf.d/$app-cache.conf"
ynh_replace_string --match_string="{APP}" --replace_string="$app" --target_file="../conf/media.conf"
ynh_add_config --template="../conf/cache.conf" --destination="/etc/nginx/conf.d/$app-cache.conf"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/media.conf"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/media.conf"
cat ../conf/media.conf >> /etc/nginx/conf.d/$domain.d/$app.conf
ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -222,7 +219,6 @@ cat "../conf/ldap.exs" >> "$config"
ynh_replace_string --match_string="config :pleroma, configurable_from_database: false" --replace_string="config :pleroma, configurable_from_database: true" --target_file="$config"
pushd $final_path/$app
su "$app" -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl migrate"
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Started $app"

View file

@ -194,11 +194,9 @@ ynh_add_nginx_config
ynh_secure_remove --file="/etc/nginx/conf.d/$app-cache.conf"
if [ $cache -eq 1 ]
then
cp -rf "../conf/cache.conf" "/etc/nginx/conf.d/$app-cache.conf"
ynh_replace_string --match_string="{APP}" --replace_string="$app" --target_file="/etc/nginx/conf.d/$app-cache.conf"
ynh_replace_string --match_string="__SIZE__" --replace_string="$size" --target_file="/etc/nginx/conf.d/$app-cache.conf"
ynh_store_file_checksum --file="/etc/nginx/conf.d/$app-cache.conf"
ynh_replace_string --match_string="{APP}" --replace_string="$app" --target_file="../conf/media.conf"
ynh_add_config --template="../conf/cache.conf" --destination="/etc/nginx/conf.d/$app-cache.conf"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/media.conf"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/media.conf"
cat ../conf/media.conf >> /etc/nginx/conf.d/$domain.d/$app.conf
ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"