1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rss-bridge_ynh.git synced 2024-09-03 20:25:51 +02:00
Testing
This commit is contained in:
JimboJoe 2019-06-09 19:24:04 +02:00 committed by GitHub
commit 5e17cb2222
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 33 additions and 43 deletions

View file

@ -6,7 +6,7 @@ rss-bridge for Yunohost
This is a rss-bridge package for YunoHost.
**Shipped version:** 2019-05-08
**Shipped version:** 2019-06-08
[rss-bridge](https://github.com/RSS-Bridge/rss-bridge) is a PHP project capable of generating ATOM feeds for websites which don't have one.

View file

@ -15,23 +15,11 @@
multi_instance=1
wrong_user=1
wrong_path=1
incorrect_path=1
corrupt_source=0
fail_download_source=0
port_already_use=0
final_path_already_use=0
;;; Levels
Level 1=auto
Level 2=auto
Level 3=auto
Level 4=na
# https://github.com/YunoHost-Apps/rss-bridge_ynh/issues/2
Level 5=1
Level 6=auto
Level 7=auto
Level 8=0
Level 9=0
Level 10=0
change_url=1
;;; Levels
# If the level 5 (Package linter) is forced to 1. Please add justifications here.
Level 5=auto
;;; Upgrade options
; commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80
name=Upgrade to upstream version 2018-04-06

View file

@ -1,7 +1,8 @@
location YNH_WWW_PATH {
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias YNH_WWW_ALIAS/ ;
alias __FINALPATH__/ ;
# Example PHP configuration (remove if not used)
index index.php;
@ -12,8 +13,8 @@ location YNH_WWW_PATH {
try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php5-fpm-YNH_WWW_APP.sock;
fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock;
fastcgi_index index.php;
include fastcgi_params;

View file

@ -8,7 +8,7 @@
},
"url": "https://github.com/RSS-Bridge/rss-bridge",
"license": "Unlicense",
"version": "2019-05-08~ynh1",
"version": "2019-06-08~ynh1",
"maintainer": {
"name": "JimboJoe",
"email": "jimmy@monin.net"

View file

@ -3,13 +3,13 @@
#
# Package version
VERSION="2019-05-08"
VERSION="2019-06-08"
# Full sources tarball URL
SOURCE_URL="https://github.com/RSS-Bridge/rss-bridge/archive/${VERSION}.tar.gz"
# Full sources tarball checksum
SOURCE_SHA256="94162a74feeaef708df7da1e26e122ff3d9d428636e6f48b65357daf70576fc4"
SOURCE_SHA256="4e01e23f9e8898b1f66198ac0535839361377aeb44af824e4efaa05203bd38b7"
# App package root directory should be the parent folder
PKGDIR=$(cd ../; pwd)

View file

@ -21,6 +21,9 @@ new_path=$YNH_APP_NEW_PATH
app=$YNH_APP_INSTANCE_NAME
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# CHECK PATHS SYNTAX
#=================================================
@ -60,7 +63,13 @@ then
# Make a backup of the original nginx config file if modified
ynh_backup_if_checksum_is_different "$nginx_conf_path"
ynh_replace_string "location $old_path" "location $new_path" "$nginx_conf_path"
# Set global variables for nginx helper
domain="$old_domain"
path_url="$new_path"
# Store path_url setting
ynh_app_setting_set $app path_url "$path_url"
# Create a dedicated nginx config
ynh_add_nginx_config
# Calculate and store the nginx config file checksum
ynh_store_file_checksum "$nginx_conf_path"

View file

@ -81,12 +81,8 @@ done
# NGINX CONFIGURATION
#=================================================
nginx_conf=$PKGDIR/conf/nginx.conf
ynh_replace_string "YNH_WWW_PATH" "$path_url" "$nginx_conf"
ynh_replace_string "YNH_WWW_ALIAS" "$final_path" "$nginx_conf"
ynh_replace_string "YNH_WWW_APP" "${app}" "$nginx_conf"
sudo cp "$nginx_conf" "/etc/nginx/conf.d/${domain}.d/${app}.conf"
# Create a dedicated nginx config
ynh_add_nginx_config
# Copy and set php-fpm configuration
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"

View file

@ -35,16 +35,16 @@ ynh_secure_remove "/var/www/$app"
# REMOVE NGINX AND PHP-FPM CONFIGURATION
#=================================================
# Delete app directory and configurations
sudo rm -rf "/var/www/${app}"
sudo rm -f "/etc/php5/fpm/pool.d/${app}.conf"
[[ -n $domain ]] && sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf"
ynh_secure_remove --file="/var/www/${app}"
ynh_secure_remove --file="/etc/php5/fpm/pool.d/${app}.conf"
[[ -n $domain ]] && sudo ynh_secure_remove --file="/etc/nginx/conf.d/${domain}.d/${app}.conf"
# Reload services
sudo systemctl restart php5-fpm
sudo systemctl reload nginx
systemctl restart php5-fpm
systemctl reload nginx
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_system_user_delete $app
ynh_system_user_delete $app

View file

@ -78,12 +78,8 @@ done
# NGINX CONFIGURATION
#=================================================
nginx_conf=$PKGDIR/conf/nginx.conf
ynh_replace_string "YNH_WWW_PATH" "$path_url" "$nginx_conf"
ynh_replace_string "YNH_WWW_ALIAS" "$final_path" "$nginx_conf"
ynh_replace_string "YNH_WWW_APP" "${app}" "$nginx_conf"
sudo cp "$nginx_conf" "/etc/nginx/conf.d/${domain}.d/${app}.conf"
# Create a dedicated nginx config
ynh_add_nginx_config
# Copy and set php-fpm configuration
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"