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

Apply last example_ynh

This commit is contained in:
yalh76 2019-03-14 00:35:51 +01:00
parent c0b8f66249
commit ce07f8bd2c
7 changed files with 54 additions and 19 deletions

View file

@ -1,17 +1,14 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias __FINALPATH__/ ;
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__PORT__/;
proxy_set_header Host $host;
proxy_buffering off;
proxy_pass http://127.0.0.1:__PORT__/;
proxy_set_header Host $host;
# proxy_buffering off;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;

View file

@ -6,7 +6,7 @@
"en": "Distributed pastebin with ActivityPub.",
"fr": "Pastebin distribué utilisant le protocole ActivityPub."
},
"version": "1.0~ynh5",
"version": "1.0~ynh6",
"url": "https://example.com",
"license": "Apache-2.0",
"maintainer": {

23
pull_request_template.md Normal file
View file

@ -0,0 +1,23 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished.
- [ ] Tested with Package_check.
- [ ] Fix or enhancement tested.
- [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested.
## Validation
---
- [ ] **Code review**
- [ ] **Approval (LGTM)**
*Code review and approval have to be from a member of @YunoHost/apps group*
- **CI succeeded** :
[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/distbin_ynh%20-BRANCH-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/distbin_ynh%20-BRANCH-/)
*Please replace '-BRANCH-' in this link by the name of the branch used.*
*If the PR is from a forked repository. Please provide public results from package_check.*
When the PR is marked as ready to merge, you have to wait for 3 days before really merging it.

View file

@ -1,5 +1,12 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
# dependencies used by the app
pkg_dependencies="ca-certificates"
#=================================================
# PERSONAL HELPERS
#=================================================

View file

@ -101,7 +101,7 @@ ynh_print_info "Installing dependencies ..."
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
ynh_install_app_dependencies ca-certificates
ynh_install_app_dependencies $pkg_dependencies
ynh_install_nodejs 8
#=================================================

View file

@ -6,6 +6,7 @@
# IMPORT GENERIC HELPERS
#=================================================
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source ../settings/scripts/ynh_systemd_action
source /usr/share/yunohost/helpers
@ -73,18 +74,22 @@ ynh_system_user_create "$app" "$final_path"
# Restore permissions on app files
chown -R "$app":"$app" "$final_path"
mkdir -p /var/log/$app
chown -R $app:$app /var/log/$app
#=================================================
# SPECIFIC RESTORATION
#=================================================
# CREATE LOG FOLDER
#=================================================
mkdir -p "/var/log/$app"
chown -R "$app":"$app" "/var/log/$app"
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_print_info "Reinstalling dependencies..."
# Define and install dependencies
ynh_install_app_dependencies ca-certificates
ynh_install_app_dependencies $pkg_dependencies
ynh_install_nodejs 8
#=================================================

View file

@ -84,10 +84,9 @@ ynh_print_info "Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src#
#ynh_setup_source "$final_path"
pushd $final_path
git reset --hard
git pull --quiet
popd
git clone --quiet https://github.com/gobengo/distbin "$final_path/upgrade"
cp -a "$final_path/upgrade/." "$final_path/$app/."
rm -r "$final_path/upgrade"
#=================================================
# NGINX CONFIGURATION
@ -102,7 +101,7 @@ ynh_add_nginx_config
#=================================================
ynh_print_info "Upgrading dependencies..."
ynh_install_app_dependencies ca-certificates
ynh_install_app_dependencies $pkg_dependencies
ynh_install_nodejs 8
#=================================================
@ -187,8 +186,12 @@ ynh_add_systemd_config
#chown -R root: $final_path
chown -R $app:$app $final_path
mkdir -p /var/log/$app
chown -R $app:$app /var/log/$app
#=================================================
# CREATE LOG FOLDER
#=================================================
mkdir -p "/var/log/$app"
chown -R "$app":"$app" "/var/log/$app"
#=================================================
# SETUP SSOWAT